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.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Sebastian Reichel <[email protected]>
Cc: Dmitry Eremin-Solenikov <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Frans Klaver <[email protected]>
Cc: "René Moll" <[email protected]>
Cc: Wolfram Sang <[email protected]>
Cc: [email protected]
Acked-by: Frans Klaver <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
This commit is contained in:
Thomas Gleixner 2015-04-14 21:09:20 +00:00 • committed by Sebastian Reichel
commit d8818257d3

View file

@ -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,9 +154,8 @@ 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 */