diff options
| author | Nam Cao <[email protected]> | 2025-02-05 10:45:49 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2025-02-18 10:19:01 +0000 |
| commit | a63cb05bd553d93e43bfac4a899cd356082d307c (patch) | |
| tree | fc289087a4c502ab047e906a196fbd2cfb6badf5 /drivers/usb | |
| parent | xfrm: Switch to use hrtimer_setup() (diff) | |
| download | kernel-a63cb05bd553d93e43bfac4a899cd356082d307c.tar.gz kernel-a63cb05bd553d93e43bfac4a899cd356082d307c.zip | |
USB: chipidea: 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/a6e43ac5a90f975343e1cef2d8346b4697ec0473.1738746904.git.namcao@linutronix.de
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index c17516c29b63..a093544482d5 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -424,8 +424,7 @@ static enum hrtimer_restart ci_otg_hrtimer_func(struct hrtimer *t) /* Initialize timers */ static int ci_otg_init_timers(struct ci_hdrc *ci) { - hrtimer_init(&ci->otg_fsm_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); - ci->otg_fsm_hrtimer.function = ci_otg_hrtimer_func; + hrtimer_setup(&ci->otg_fsm_hrtimer, ci_otg_hrtimer_func, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); return 0; } |
