From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-kernel@vger.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-renesas-soc@vger.kernel.org,
Mark Brown <broonie@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 61/61] ASoC: atmel: simplify getting .drvdata
Date: Fri, 20 Apr 2018 10:06:46 +0200 [thread overview]
Message-ID: <23044c16-efbf-7920-2a25-338ad46376eb@microchip.com> (raw)
In-Reply-To: <20180419140641.27926-62-wsa+renesas@sang-engineering.com>
On 19/04/2018 at 16:06, Wolfram Sang wrote:
> We should get drvdata from struct device directly. Going via
> platform_device is an unneeded step back and forth.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
>
> Build tested only. buildbot is happy. Please apply individually.
>
> sound/soc/atmel/atmel_ssc_dai.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
> index a1e2c5682dcd..4a0275a6505d 100644
> --- a/sound/soc/atmel/atmel_ssc_dai.c
> +++ b/sound/soc/atmel/atmel_ssc_dai.c
> @@ -1002,8 +1002,7 @@ static const struct snd_soc_component_driver atmel_ssc_component = {
>
> static int asoc_ssc_init(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct ssc_device *ssc = platform_get_drvdata(pdev);
> + struct ssc_device *ssc = dev_get_drvdata(dev);
> int ret;
>
> ret = snd_soc_register_component(dev, &atmel_ssc_component,
> @@ -1033,8 +1032,7 @@ static int asoc_ssc_init(struct device *dev)
>
> static void asoc_ssc_exit(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct ssc_device *ssc = platform_get_drvdata(pdev);
> + struct ssc_device *ssc = dev_get_drvdata(dev);
>
> if (ssc->pdata->use_dma)
> atmel_pcm_dma_platform_unregister(dev);
>
--
Nicolas Ferre
next prev parent reply other threads:[~2018-04-20 8:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 14:05 [PATCH 00/61] tree-wide: simplify getting .drvdata Wolfram Sang
2018-04-19 14:06 ` [PATCH 45/61] slimbus: " Wolfram Sang
2018-04-19 14:06 ` [PATCH 61/61] ASoC: atmel: " Wolfram Sang
2018-04-20 8:06 ` Nicolas Ferre [this message]
2018-04-20 17:04 ` Applied "ASoC: atmel: simplify getting .drvdata" to the asoc tree 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=23044c16-efbf-7920-2a25-338ad46376eb@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=wsa+renesas@sang-engineering.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