summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_xcvr.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@inria.fr>2021-02-13 11:19:07 +0100
committerMark Brown <broonie@kernel.org>2021-03-10 14:07:08 +0100
commiteb0d22d793e82c126ce922fda387c29fe26a2bff (patch)
treeadb1063fe97ea35e1fe859d63814ed3328a549b7 /sound/soc/fsl/fsl_xcvr.c
parentASoC: sun4i-i2s: drop unneeded snd_soc_dai_set_drvdata (diff)
downloadlinux-eb0d22d793e82c126ce922fda387c29fe26a2bff.tar.xz
linux-eb0d22d793e82c126ce922fda387c29fe26a2bff.zip
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>
Diffstat (limited to 'sound/soc/fsl/fsl_xcvr.c')
-rw-r--r--sound/soc/fsl/fsl_xcvr.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c
index 6dd0a5fcd455..4f33dbe29c78 100644
--- a/sound/soc/fsl/fsl_xcvr.c
+++ b/sound/soc/fsl/fsl_xcvr.c
@@ -869,7 +869,6 @@ static int fsl_xcvr_dai_probe(struct snd_soc_dai *dai)
struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai);
snd_soc_dai_init_dma_data(dai, &xcvr->dma_prms_tx, &xcvr->dma_prms_rx);
- snd_soc_dai_set_drvdata(dai, xcvr);
snd_soc_add_dai_controls(dai, &fsl_xcvr_mode_kctl, 1);
snd_soc_add_dai_controls(dai, &fsl_xcvr_arc_mode_kctl, 1);