Sound: remove direct access of driver_data

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, July 13, 2009 - 12:00 pm

Gitweb:     http://git.kernel.org/linus/864e1e8db436dfd784340d0aef18ea303d157bcb
Commit:     864e1e8db436dfd784340d0aef18ea303d157bcb
Parent:     909662e1e7290945fa3bca038bc3b7bb5d19499f
Author:     Greg Kroah-Hartman <gregkh@suse.de>
AuthorDate: Mon Jun 22 15:46:03 2009 -0700
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Sun Jul 12 13:02:10 2009 -0700

    Sound: remove direct access of driver_data
    
    This is the last in-kernel direct usage of driver_data, replace it with
    the proper dev_get/set_drvdata() calls.
    
    Cc: Takashi Iwai <tiwai@suse.de>
    Cc: Jaroslav Kysela <perex@perex.cz>
    Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Cc: Liam Girdwood <lrg@slimlogic.co.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 sound/soc/codecs/wm8988.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index c05f718..8c0fdf8 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -1037,14 +1037,14 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi)
 	codec->control_data = spi;
 	codec->dev = &spi->dev;
 
-	spi->dev.driver_data = wm8988;
+	dev_set_drvdata(&spi->dev, wm8988);
 
 	return wm8988_register(wm8988);
 }
 
 static int __devexit wm8988_spi_remove(struct spi_device *spi)
 {
-	struct wm8988_priv *wm8988 = spi->dev.driver_data;
+	struct wm8988_priv *wm8988 = dev_get_drvdata(&spi->dev);
 
 	wm8988_unregister(wm8988);
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Sound: remove direct access of driver_data, Linux Kernel Mailing ..., (Mon Jul 13, 12:00 pm)