summaryrefslogtreecommitdiff
path: root/sound/soc/sunxi
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@inria.fr>2021-02-13 13:19:06 +0300
committerMark Brown <broonie@kernel.org>2021-03-10 16:07:07 +0300
commit36785fec16bed809f622bd523c4cabdfefa9e836 (patch)
treefbdf894e9022fcc76d591358291ada741088404a /sound/soc/sunxi
parentb8fdf60931440296912e35bfe08b351fd3c37d11 (diff)
downloadlinux-36785fec16bed809f622bd523c4cabdfefa9e836.tar.xz
ASoC: sun4i-i2s: drop unneeded snd_soc_dai_set_drvdata
snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20210213101907.1318496-4-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sunxi')
-rw-r--r--sound/soc/sunxi/sun4i-i2s.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
index 78506c3811dc..c57feae3396e 100644
--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -1079,8 +1079,6 @@ static int sun4i_i2s_dai_probe(struct snd_soc_dai *dai)
&i2s->playback_dma_data,
&i2s->capture_dma_data);
- snd_soc_dai_set_drvdata(dai, i2s);
-
return 0;
}