diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-16 16:07:31 -0700 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-10-17 10:52:22 +0200 |
commit | a6162afa7135548973ba633c7795db9648fbd4a2 (patch) | |
tree | 17fd30e77a7041717a516bb9d48f5ddfaaa4d8ad /sound/usb/line6/podhd.c | |
parent | 0011a33f097dd97d09a1ebd32c5d8df0be7ac04a (diff) | |
download | lwn-a6162afa7135548973ba633c7795db9648fbd4a2.tar.gz lwn-a6162afa7135548973ba633c7795db9648fbd4a2.zip |
ALSA: usb-audio: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/podhd.c')
-rw-r--r-- | sound/usb/line6/podhd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/usb/line6/podhd.c b/sound/usb/line6/podhd.c index 46fa8c046cb5..36ed9c85c0eb 100644 --- a/sound/usb/line6/podhd.c +++ b/sound/usb/line6/podhd.c @@ -158,7 +158,7 @@ static struct line6_pcm_properties podx3_pcm_properties = { }; static struct usb_driver podhd_driver; -static void podhd_startup_start_workqueue(unsigned long data); +static void podhd_startup_start_workqueue(struct timer_list *t); static void podhd_startup_workqueue(struct work_struct *work); static int podhd_startup_finalize(struct usb_line6_podhd *pod); @@ -208,12 +208,12 @@ static void podhd_startup(struct usb_line6_podhd *pod) /* delay startup procedure: */ line6_start_timer(&pod->startup_timer, PODHD_STARTUP_DELAY, - podhd_startup_start_workqueue, (unsigned long)pod); + podhd_startup_start_workqueue); } -static void podhd_startup_start_workqueue(unsigned long data) +static void podhd_startup_start_workqueue(struct timer_list *t) { - struct usb_line6_podhd *pod = (struct usb_line6_podhd *)data; + struct usb_line6_podhd *pod = from_timer(pod, t, startup_timer); CHECK_STARTUP_PROGRESS(pod->startup_progress, PODHD_STARTUP_SCHEDULE_WORKQUEUE); @@ -319,7 +319,7 @@ static int podhd_init(struct usb_line6 *line6, line6->disconnect = podhd_disconnect; - init_timer(&pod->startup_timer); + timer_setup(&pod->startup_timer, NULL, 0); INIT_WORK(&pod->startup_work, podhd_startup_workqueue); if (pod->line6.properties->capabilities & LINE6_CAP_CONTROL) { |