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.

rtc: class: 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: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/all/22f3f087ddbab1708583033c07c3b7fb17810110.1738746904.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
c9269791 b7011929

+1 -2
+1 -2
drivers/rtc/class.c
··· 240 240 /* Init uie timer */ 241 241 rtc_timer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, rtc); 242 242 /* Init pie timer */ 243 - hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 244 - rtc->pie_timer.function = rtc_pie_update_irq; 243 + hrtimer_setup(&rtc->pie_timer, rtc_pie_update_irq, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 245 244 rtc->pie_enabled = 0; 246 245 247 246 set_bit(RTC_FEATURE_ALARM, rtc->features);