From: Julia Lawall <Julia.Lawall@inria.fr>
To: Timur Tabi <timur@kernel.org>
Cc: kernel-janitors@vger.kernel.org,
Nicolin Chen <nicoleotsuka@gmail.com>,
Xiubo Li <Xiubo.Lee@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Shengjiu Wang <shengjiu.wang@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] ASoC: fsl: drop unneeded snd_soc_dai_set_drvdata
Date: Sat, 13 Feb 2021 11:19:07 +0100 [thread overview]
Message-ID: <20210213101907.1318496-5-Julia.Lawall@inria.fr> (raw)
In-Reply-To: <20210213101907.1318496-1-Julia.Lawall@inria.fr>
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>
---
sound/soc/fsl/fsl_micfil.c | 2 --
sound/soc/fsl/fsl_sai.c | 2 --
sound/soc/fsl/fsl_xcvr.c | 1 -
3 files changed, 5 deletions(-)
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 8aedf6590b28..fd21017fa2bd 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -423,8 +423,6 @@ static int fsl_micfil_dai_probe(struct snd_soc_dai *cpu_dai)
return ret;
}
- snd_soc_dai_set_drvdata(cpu_dai, micfil);
-
return 0;
}
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 5e65b456d3e2..8876d0ed37d9 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -727,8 +727,6 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx,
&sai->dma_params_rx);
- snd_soc_dai_set_drvdata(cpu_dai, sai);
-
return 0;
}
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c
index dd228b421e2c..8a3bde718697 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);
next prev parent reply other threads:[~2021-02-13 10:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 10:19 [PATCH 0/4] drop unneeded snd_soc_dai_set_drvdata Julia Lawall
2021-02-13 10:19 ` [PATCH 1/4] ASoC: mmp-sspa: " Julia Lawall
2021-02-13 10:19 ` [PATCH 2/4] ASoC: mxs-saif: " Julia Lawall
2021-02-13 10:19 ` [PATCH 3/4] ASoC: sun4i-i2s: " Julia Lawall
2021-02-13 10:19 ` Julia Lawall [this message]
2021-02-18 6:30 ` [PATCH 4/4] ASoC: fsl: " Nicolin Chen
2021-03-01 23:34 ` [PATCH 0/4] " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210213101907.1318496-5-Julia.Lawall@inria.fr \
--to=julia.lawall@inria.fr \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=shengjiu.wang@gmail.com \
--cc=timur@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).