Skip to content

Commit

Permalink
ASoC: siu: 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]>
Acked-by: Mark Brown <[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 b07e4a3 commit ea0364c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sound/soc/sh/siu_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ static int siu_pcm_rd_set(struct siu_port *port_info,
return 0;
}

static void siu_io_tasklet(unsigned long data)
static void siu_io_tasklet(struct tasklet_struct *t)
{
struct siu_stream *siu_stream = (struct siu_stream *)data;
struct siu_stream *siu_stream = from_tasklet(siu_stream, t, tasklet);
struct snd_pcm_substream *substream = siu_stream->substream;
struct device *dev = substream->pcm->card->dev;
struct snd_pcm_runtime *rt = substream->runtime;
Expand Down Expand Up @@ -520,10 +520,8 @@ static int siu_pcm_new(struct snd_soc_component *component,
(*port_info)->pcm = pcm;

/* IO tasklets */
tasklet_init(&(*port_info)->playback.tasklet, siu_io_tasklet,
(unsigned long)&(*port_info)->playback);
tasklet_init(&(*port_info)->capture.tasklet, siu_io_tasklet,
(unsigned long)&(*port_info)->capture);
tasklet_setup(&(*port_info)->playback.tasklet, siu_io_tasklet);
tasklet_setup(&(*port_info)->capture.tasklet, siu_io_tasklet);
}

dev_info(card->dev, "SuperH SIU driver initialized.\n");
Expand Down

0 comments on commit ea0364c

Please sign in to comment.