OSDN Git Service

ASoC: fsl: drop unneeded snd_soc_dai_set_drvdata
authorJulia Lawall <Julia.Lawall@inria.fr>
Sat, 13 Feb 2021 10:19:07 +0000 (11:19 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 13:07:08 +0000 (13:07 +0000)
commiteb0d22d793e82c126ce922fda387c29fe26a2bff
treeadb1063fe97ea35e1fe859d63814ed3328a549b7
parent36785fec16bed809f622bd523c4cabdfefa9e836
ASoC: fsl: 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>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20210213101907.1318496-5-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_micfil.c
sound/soc/fsl/fsl_sai.c
sound/soc/fsl/fsl_xcvr.c