Skip to content

Commit

Permalink
ALSA: usb-audio: 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 ad77b35 commit 7fbf954
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sound/usb/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,9 @@ static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint *ep)
spin_unlock_irqrestore(&ep->buffer_lock, flags);
}

static void snd_usbmidi_out_tasklet(unsigned long data)
static void snd_usbmidi_out_tasklet(struct tasklet_struct *t)
{
struct snd_usb_midi_out_endpoint *ep =
(struct snd_usb_midi_out_endpoint *) data;
struct snd_usb_midi_out_endpoint *ep = from_tasklet(ep, t, tasklet);

snd_usbmidi_do_output(ep);
}
Expand Down Expand Up @@ -1441,7 +1440,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi,
}

spin_lock_init(&ep->buffer_lock);
tasklet_init(&ep->tasklet, snd_usbmidi_out_tasklet, (unsigned long)ep);
tasklet_setup(&ep->tasklet, snd_usbmidi_out_tasklet);
init_waitqueue_head(&ep->drain_wait);

for (i = 0; i < 0x10; ++i)
Expand Down

0 comments on commit 7fbf954

Please sign in to comment.