aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8731.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-04 15:40:54 -0400
committerTakashi Iwai <tiwai@suse.de>2009-05-12 03:20:54 -0400
commitae31c1fbdbb18d917b0a1139497c2dbd35886989 (patch)
treecdc2e881e4195858a72a88627b28461900477757 /sound/soc/codecs/wm8731.c
parent091bf7624d1c90cec9e578a18529f615213ff847 (diff)
sound: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r--sound/soc/codecs/wm8731.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index e043e3f60008..7a205876ef4f 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)
666 codec->hw_write = (hw_write_t)wm8731_spi_write; 666 codec->hw_write = (hw_write_t)wm8731_spi_write;
667 codec->dev = &spi->dev; 667 codec->dev = &spi->dev;
668 668
669 spi->dev.driver_data = wm8731; 669 dev_set_drvdata(&spi->dev, wm8731);
670 670
671 return wm8731_register(wm8731); 671 return wm8731_register(wm8731);
672} 672}
673 673
674static int __devexit wm8731_spi_remove(struct spi_device *spi) 674static int __devexit wm8731_spi_remove(struct spi_device *spi)
675{ 675{
676 struct wm8731_priv *wm8731 = spi->dev.driver_data; 676 struct wm8731_priv *wm8731 = dev_get_drvdata(&spi->dev);
677 677
678 wm8731_unregister(wm8731); 678 wm8731_unregister(wm8731);
679 679