From: Mark Brown <broonie@sirena.org.uk>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: lrg@slimlogic.co.uk, alsa-devel@alsa-project.org,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH] soc: remove driver_data direct access of struct device
Date: Mon, 11 May 2009 22:09:11 +0100 [thread overview]
Message-ID: <20090511210910.GA4482@sirena.org.uk> (raw)
In-Reply-To: <4A088314.1000204@gmail.com>
On Mon, May 11, 2009 at 09:57:08PM +0200, Roel Kluin wrote:
I've applied this since it's so trivial but please in future:
- Give a Signed-off-by for your patches.
- CC maintainers for your patches.
> diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
> index 510efa6..e4547de 100644
> --- a/sound/soc/codecs/wm8400.c
> +++ b/sound/soc/codecs/wm8400.c
> @@ -1473,8 +1473,8 @@ static int wm8400_codec_probe(struct platform_device *dev)
>
> codec = &priv->codec;
> codec->private_data = priv;
> - codec->control_data = dev->dev.driver_data;
> - priv->wm8400 = dev->dev.driver_data;
> + codec->control_data = dev_get_drvdata(&dev->dev);
> + priv->wm8400 = dev_get_drvdata(&dev->dev);
>
> ret = regulator_bulk_get(priv->wm8400->dev,
> ARRAY_SIZE(power), &power[0]);
> diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
> index e043e3f..7a20587 100644
> --- a/sound/soc/codecs/wm8731.c
> +++ b/sound/soc/codecs/wm8731.c
> @@ -666,14 +666,14 @@ static int __devinit wm8731_spi_probe(struct spi_device *spi)
> codec->hw_write = (hw_write_t)wm8731_spi_write;
> codec->dev = &spi->dev;
>
> - spi->dev.driver_data = wm8731;
> + dev_set_drvdata(&spi->dev, wm8731);
>
> return wm8731_register(wm8731);
> }
>
> static int __devexit wm8731_spi_remove(struct spi_device *spi)
> {
> - struct wm8731_priv *wm8731 = spi->dev.driver_data;
> + struct wm8731_priv *wm8731 = dev_get_drvdata(&spi->dev);
>
> wm8731_unregister(wm8731);
>
> diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
> index a6e8f3f..d121e58 100644
> --- a/sound/soc/codecs/wm8753.c
> +++ b/sound/soc/codecs/wm8753.c
> @@ -1822,14 +1822,14 @@ static int __devinit wm8753_spi_probe(struct spi_device *spi)
> codec->hw_write = (hw_write_t)wm8753_spi_write;
> codec->dev = &spi->dev;
>
> - spi->dev.driver_data = wm8753;
> + dev_set_drvdata(&spi->dev, wm8753);
>
> return wm8753_register(wm8753);
> }
>
> static int __devexit wm8753_spi_remove(struct spi_device *spi)
> {
> - struct wm8753_priv *wm8753 = spi->dev.driver_data;
> + struct wm8753_priv *wm8753 = dev_get_drvdata(&spi->dev);
> wm8753_unregister(wm8753);
> return 0;
> }
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
prev parent reply other threads:[~2009-05-11 21:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 19:57 [PATCH] soc: remove driver_data direct access of struct device Roel Kluin
2009-05-11 21:09 ` Mark Brown [this message]
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=20090511210910.GA4482@sirena.org.uk \
--to=broonie@sirena.org.uk \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=roel.kluin@gmail.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