Skip to content

Commit 5e55888

Browse files
covanamKAGA-KOKO
authored andcommitted
pps: generators: pps_gen_parport: 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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Zack Rusin <[email protected]> Link: https://lore.kernel.org/all/4bf3bb22e21f27c58bb28690d856df913431e693.1738746904.git.namcao@linutronix.de
1 parent c926979 commit 5e55888

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pps/generators/pps_gen_parport.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ static void parport_attach(struct parport *port)
208208

209209
calibrate_port(&device);
210210

211-
hrtimer_init(&device.timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
212-
device.timer.function = hrtimer_event;
211+
hrtimer_setup(&device.timer, hrtimer_event, CLOCK_REALTIME, HRTIMER_MODE_ABS);
213212
hrtimer_start(&device.timer, next_intr_time(&device), HRTIMER_MODE_ABS);
214213

215214
return;

0 commit comments

Comments
 (0)