Skip to content

Commit

Permalink
ASoC: remove driver_data direct access of struct device
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Roel Kluin authored and Mark Brown committed May 11, 2009
1 parent 151ab22 commit 31cb31f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8400.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 31cb31f

Please sign in to comment.