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>
Цей коміт міститься в:
@@ -241,9 +241,9 @@ static int snd_toneport_source_put(struct snd_kcontrol *kcontrol,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void toneport_start_pcm(unsigned long arg)
|
||||
static void toneport_start_pcm(struct timer_list *t)
|
||||
{
|
||||
struct usb_line6_toneport *toneport = (struct usb_line6_toneport *)arg;
|
||||
struct usb_line6_toneport *toneport = from_timer(toneport, t, timer);
|
||||
struct usb_line6 *line6 = &toneport->line6;
|
||||
|
||||
line6_pcm_acquire(line6->line6pcm, LINE6_STREAM_MONITOR, true);
|
||||
@@ -415,8 +415,7 @@ static int toneport_init(struct usb_line6 *line6,
|
||||
struct usb_line6_toneport *toneport = (struct usb_line6_toneport *) line6;
|
||||
|
||||
toneport->type = id->driver_info;
|
||||
setup_timer(&toneport->timer, toneport_start_pcm,
|
||||
(unsigned long)toneport);
|
||||
timer_setup(&toneport->timer, toneport_start_pcm, 0);
|
||||
|
||||
line6->disconnect = line6_toneport_disconnect;
|
||||
|
||||
|
Посилання в новій задачі
Заблокувати користувача