Commit 36785fec authored by Julia Lawall's avatar Julia Lawall Committed by Mark Brown

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: default avatarJulia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/20210213101907.1318496-4-Julia.Lawall@inria.frSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b8fdf609
......@@ -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;
}
......
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