aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/line6/pod.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-16 16:07:31 -0700
committerTakashi Iwai <tiwai@suse.de>2017-10-17 10:52:22 +0200
commita6162afa7135548973ba633c7795db9648fbd4a2 (patch)
tree17fd30e77a7041717a516bb9d48f5ddfaaa4d8ad /sound/usb/line6/pod.c
parentMerge branch 'for-linus' into for-next (diff)
downloadlinux-dev-a6162afa7135548973ba633c7795db9648fbd4a2.tar.xz
linux-dev-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/pod.c')
-rw-r--r--sound/usb/line6/pod.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c
index 358224cc5638..020c81818951 100644
--- a/sound/usb/line6/pod.c
+++ b/sound/usb/line6/pod.c
@@ -174,7 +174,7 @@ static const char pod_version_header[] = {
};
/* forward declarations: */
-static void pod_startup2(unsigned long data);
+static void pod_startup2(struct timer_list *t);
static void pod_startup3(struct usb_line6_pod *pod);
static char *pod_alloc_sysex_buffer(struct usb_line6_pod *pod, int code,
@@ -286,13 +286,12 @@ static void pod_startup1(struct usb_line6_pod *pod)
CHECK_STARTUP_PROGRESS(pod->startup_progress, POD_STARTUP_INIT);
/* delay startup procedure: */
- line6_start_timer(&pod->startup_timer, POD_STARTUP_DELAY, pod_startup2,
- (unsigned long)pod);
+ line6_start_timer(&pod->startup_timer, POD_STARTUP_DELAY, pod_startup2);
}
-static void pod_startup2(unsigned long data)
+static void pod_startup2(struct timer_list *t)
{
- struct usb_line6_pod *pod = (struct usb_line6_pod *)data;
+ struct usb_line6_pod *pod = from_timer(pod, t, startup_timer);
struct usb_line6 *line6 = &pod->line6;
CHECK_STARTUP_PROGRESS(pod->startup_progress, POD_STARTUP_VERSIONREQ);
@@ -413,7 +412,7 @@ static int pod_init(struct usb_line6 *line6,
line6->process_message = line6_pod_process_message;
line6->disconnect = line6_pod_disconnect;
- init_timer(&pod->startup_timer);
+ timer_setup(&pod->startup_timer, NULL, 0);
INIT_WORK(&pod->startup_work, pod_startup4);
/* create sysfs entries: */