Skip to content

Commit

Permalink
Sound: remove direct access of driver_data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Jul 12, 2009
1 parent 909662e commit 864e1e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8988.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 864e1e8

Please sign in to comment.