Commit 51bc581a authored by Allen Pais's avatar Allen Pais Committed by Takashi Iwai

ALSA: firewire: 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>
Acked-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200902040221.354941-3-allen.lkml@gmail.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d1a58aae
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#define IT_PKT_HEADER_SIZE_CIP 8 // For 2 CIP header. #define IT_PKT_HEADER_SIZE_CIP 8 // For 2 CIP header.
#define IT_PKT_HEADER_SIZE_NO_CIP 0 // Nothing. #define IT_PKT_HEADER_SIZE_NO_CIP 0 // Nothing.
static void pcm_period_tasklet(unsigned long data); static void pcm_period_tasklet(struct tasklet_struct *t);
/** /**
* amdtp_stream_init - initialize an AMDTP stream structure * amdtp_stream_init - initialize an AMDTP stream structure
...@@ -94,7 +94,7 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, ...@@ -94,7 +94,7 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
s->flags = flags; s->flags = flags;
s->context = ERR_PTR(-1); s->context = ERR_PTR(-1);
mutex_init(&s->mutex); mutex_init(&s->mutex);
tasklet_init(&s->period_tasklet, pcm_period_tasklet, (unsigned long)s); tasklet_setup(&s->period_tasklet, pcm_period_tasklet);
s->packet_index = 0; s->packet_index = 0;
init_waitqueue_head(&s->callback_wait); init_waitqueue_head(&s->callback_wait);
...@@ -441,9 +441,9 @@ static void update_pcm_pointers(struct amdtp_stream *s, ...@@ -441,9 +441,9 @@ static void update_pcm_pointers(struct amdtp_stream *s,
} }
} }
static void pcm_period_tasklet(unsigned long data) static void pcm_period_tasklet(struct tasklet_struct *t)
{ {
struct amdtp_stream *s = (void *)data; struct amdtp_stream *s = from_tasklet(s, t, period_tasklet);
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm); struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
if (pcm) if (pcm)
......
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