Skip to content

Commit

Permalink
ALSA: ua101: convert tasklets to use new tasklet_setup() API
Browse files Browse the repository at this point in the history
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: Romain Perier <[email protected]>
Signed-off-by: Allen Pais <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Allen Pais authored and tiwai committed Sep 2, 2020
1 parent 7fbf954 commit 07da90b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sound/usb/misc/ua101.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ static inline void add_with_wraparound(struct ua101 *ua,
*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 int frames;
struct ua101_urb *urb;
Expand Down Expand Up @@ -1218,8 +1218,7 @@ static int ua101_probe(struct usb_interface *interface,
spin_lock_init(&ua->lock);
mutex_init(&ua->mutex);
INIT_LIST_HEAD(&ua->ready_playback_urbs);
tasklet_init(&ua->playback_tasklet,
playback_tasklet, (unsigned long)ua);
tasklet_setup(&ua->playback_tasklet, playback_tasklet);
init_waitqueue_head(&ua->alsa_capture_wait);
init_waitqueue_head(&ua->rate_feedback_wait);
init_waitqueue_head(&ua->alsa_playback_wait);
Expand Down

0 comments on commit 07da90b

Please sign in to comment.