Skip to content

Commit

Permalink
ASoC: Kill direct accesses to driver_data
Browse files Browse the repository at this point in the history
Replaced with dev_{get|set}_drvdata().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 17, 2009
1 parent 1274738 commit 416c8fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/ad1938.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,14 @@ static int __devinit ad1938_spi_probe(struct spi_device *spi)
codec->control_data = spi;
codec->dev = &spi->dev;

spi->dev.driver_data = ad1938;
dev_set_drvdata(&spi->dev, ad1938);

return ad1938_register(ad1938);
}

static int __devexit ad1938_spi_remove(struct spi_device *spi)
{
struct ad1938_priv *ad1938 = spi->dev.driver_data;
struct ad1938_priv *ad1938 = dev_get_drvdata(&spi->dev);

ad1938_unregister(ad1938);
return 0;
Expand Down

0 comments on commit 416c8fe

Please sign in to comment.