diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-04-13 17:43:35 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-04-23 15:38:01 +0300 |
commit | 4101ecc23db90ae7e9b2a4b1cfe4aaf37405b4a8 (patch) | |
tree | 6938f6545ba9e3c2b8536e1fbc20e24739a2b081 /drivers/power/reset/ltc2952-poweroff.c | |
parent | b484403b9abe5f444ae2fee6a249759bb3c35bcf (diff) | |
download | linux-4101ecc23db90ae7e9b2a4b1cfe4aaf37405b4a8.tar.xz |
power: reset: ltc2952: Remove bogus hrtimer_start() return value checks
The return value of hrtimer_start() tells whether the timer was
inactive or active already when hrtimer_start() was called.
The code emits a bogus warning if the timer was active already
claiming that the timer could not be started.
Remove it along with the bogus comment in the else path.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Frans Klaver <frans.klaver@xsens.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-pm@vger.kernel.org
Diffstat (limited to 'drivers/power/reset/ltc2952-poweroff.c')
-rw-r--r-- | drivers/power/reset/ltc2952-poweroff.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c index 7ef193b6f7fe..5f855f99bdfc 100644 --- a/drivers/power/reset/ltc2952-poweroff.c +++ b/drivers/power/reset/ltc2952-poweroff.c @@ -120,18 +120,7 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer) static void ltc2952_poweroff_start_wde(struct ltc2952_poweroff *data) { - if (hrtimer_start(&data->timer_wde, data->wde_interval, - HRTIMER_MODE_REL)) { - /* - * The device will not toggle the watchdog reset, - * thus shut down is only safe if the PowerPath controller - * has a long enough time-off before triggering a hardware - * power-off. - * - * Only sending a warning as the system will power-off anyway - */ - dev_err(data->dev, "unable to start the timer\n"); - } + hrtimer_start(&data->timer_wde, data->wde_interval, HRTIMER_MODE_REL); } static enum hrtimer_restart @@ -165,12 +154,10 @@ static irqreturn_t ltc2952_poweroff_handler(int irq, void *dev_id) } if (gpiod_get_value(data->gpio_trigger)) { - if (hrtimer_start(&data->timer_trigger, data->trigger_delay, - HRTIMER_MODE_REL)) - dev_err(data->dev, "unable to start the wait timer\n"); + hrtimer_start(&data->timer_trigger, data->trigger_delay, + HRTIMER_MODE_REL); } else { hrtimer_cancel(&data->timer_trigger); - /* omitting return value check, timer should have been valid */ } return IRQ_HANDLED; } |