Commit 07da90b0 authored by Allen Pais's avatar Allen Pais Committed by Takashi Iwai

ALSA: ua101: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-11-allen.lkml@gmail.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7fbf9547
...@@ -247,9 +247,9 @@ static inline void add_with_wraparound(struct ua101 *ua, ...@@ -247,9 +247,9 @@ static inline void add_with_wraparound(struct ua101 *ua,
*value -= ua->playback.queue_length; *value -= ua->playback.queue_length;
} }
static void playback_tasklet(unsigned long data) static void playback_tasklet(struct tasklet_struct *t)
{ {
struct ua101 *ua = (void *)data; struct ua101 *ua = from_tasklet(ua, t, playback_tasklet);
unsigned long flags; unsigned long flags;
unsigned int frames; unsigned int frames;
struct ua101_urb *urb; struct ua101_urb *urb;
...@@ -1218,8 +1218,7 @@ static int ua101_probe(struct usb_interface *interface, ...@@ -1218,8 +1218,7 @@ static int ua101_probe(struct usb_interface *interface,
spin_lock_init(&ua->lock); spin_lock_init(&ua->lock);
mutex_init(&ua->mutex); mutex_init(&ua->mutex);
INIT_LIST_HEAD(&ua->ready_playback_urbs); INIT_LIST_HEAD(&ua->ready_playback_urbs);
tasklet_init(&ua->playback_tasklet, tasklet_setup(&ua->playback_tasklet, playback_tasklet);
playback_tasklet, (unsigned long)ua);
init_waitqueue_head(&ua->alsa_capture_wait); init_waitqueue_head(&ua->alsa_capture_wait);
init_waitqueue_head(&ua->rate_feedback_wait); init_waitqueue_head(&ua->rate_feedback_wait);
init_waitqueue_head(&ua->alsa_playback_wait); init_waitqueue_head(&ua->alsa_playback_wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment