Commit ea0364c01e9539a2ec973ab49df4b3124ec5d0fc
Committed by
Takashi Iwai
1 parent
b07e4a3fb2
ASoC: siu: 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: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20200902040221.354941-8-allen.lkml@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 1 changed file with 4 additions and 6 deletions Side-by-side Diff
sound/soc/sh/siu_pcm.c
... | ... | @@ -198,9 +198,9 @@ |
198 | 198 | return 0; |
199 | 199 | } |
200 | 200 | |
201 | -static void siu_io_tasklet(unsigned long data) | |
201 | +static void siu_io_tasklet(struct tasklet_struct *t) | |
202 | 202 | { |
203 | - struct siu_stream *siu_stream = (struct siu_stream *)data; | |
203 | + struct siu_stream *siu_stream = from_tasklet(siu_stream, t, tasklet); | |
204 | 204 | struct snd_pcm_substream *substream = siu_stream->substream; |
205 | 205 | struct device *dev = substream->pcm->card->dev; |
206 | 206 | struct snd_pcm_runtime *rt = substream->runtime; |
... | ... | @@ -520,10 +520,8 @@ |
520 | 520 | (*port_info)->pcm = pcm; |
521 | 521 | |
522 | 522 | /* IO tasklets */ |
523 | - tasklet_init(&(*port_info)->playback.tasklet, siu_io_tasklet, | |
524 | - (unsigned long)&(*port_info)->playback); | |
525 | - tasklet_init(&(*port_info)->capture.tasklet, siu_io_tasklet, | |
526 | - (unsigned long)&(*port_info)->capture); | |
523 | + tasklet_setup(&(*port_info)->playback.tasklet, siu_io_tasklet); | |
524 | + tasklet_setup(&(*port_info)->capture.tasklet, siu_io_tasklet); | |
527 | 525 | } |
528 | 526 | |
529 | 527 | dev_info(card->dev, "SuperH SIU driver initialized.\n"); |