Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

power: reset: ltc2952-poweroff: Switch to use hrtimer_setup()

hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.

Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.

Patch was created by using Coccinelle.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/all/75ef5206f52f194b9c51653628cd2d0b083a482f.1738746904.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
563608c2 1b73fd14

+4 -4
+4 -4
drivers/power/reset/ltc2952-poweroff.c
··· 162 162 data->wde_interval = 300L * NSEC_PER_MSEC; 163 163 data->trigger_delay = ktime_set(2, 500L * NSEC_PER_MSEC); 164 164 165 - hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 166 - data->timer_trigger.function = ltc2952_poweroff_timer_trigger; 165 + hrtimer_setup(&data->timer_trigger, ltc2952_poweroff_timer_trigger, CLOCK_MONOTONIC, 166 + HRTIMER_MODE_REL); 167 167 168 - hrtimer_init(&data->timer_wde, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 169 - data->timer_wde.function = ltc2952_poweroff_timer_wde; 168 + hrtimer_setup(&data->timer_wde, ltc2952_poweroff_timer_wde, CLOCK_MONOTONIC, 169 + HRTIMER_MODE_REL); 170 170 } 171 171 172 172 static int ltc2952_poweroff_init(struct platform_device *pdev)