power: reset: ltc2952: Use hrtimer_forward_now()
authorThomas Gleixner <tglx@linutronix.de>
Thu, 23 Sep 2021 16:04:28 +0000 (18:04 +0200)
committerSebastian Reichel <sre@kernel.org>
Fri, 24 Sep 2021 21:35:11 +0000 (23:35 +0200)
hrtimer_forward_now() provides the same functionality as the open coded
hrtimer_forward() invocation. Prepares for removal of hrtimer_forward()
from the public interfaces.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/reset/ltc2952-poweroff.c

index 8688c8b..fbb3443 100644 (file)
@@ -94,7 +94,6 @@ static struct ltc2952_poweroff *ltc2952_data;
  */
 static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)
 {
-       ktime_t now;
        int state;
        struct ltc2952_poweroff *data = to_ltc2952(timer, timer_wde);
 
@@ -104,8 +103,7 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)
        state = gpiod_get_value(data->gpio_watchdog);
        gpiod_set_value(data->gpio_watchdog, !state);
 
-       now = hrtimer_cb_get_time(timer);
-       hrtimer_forward(timer, now, data->wde_interval);
+       hrtimer_forward_now(timer, data->wde_interval);
 
        return HRTIMER_RESTART;
 }