summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/da9052-spi.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-06 15:43:23 +0900
committerSamuel Ortiz <sameo@linux.intel.com>2013-04-09 12:18:16 +0200
commit1b1ba09c39a7262f322290820ad8f29f964b9eee (patch)
treef1cee37e810ff34cab1d59772fbd7e58d34c86c0 /drivers/mfd/da9052-spi.c
parent0c0d2ab069fa668daeda4204580e359dba178169 (diff)
downloadlinux-1b1ba09c39a7262f322290820ad8f29f964b9eee.tar.bz2
mfd: da9052: Use spi_get_drvdata() and spi_set_drvdata()
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/da9052-spi.c')
-rw-r--r--drivers/mfd/da9052-spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c
index 61d63b93576c..0680bcbc53de 100644
--- a/drivers/mfd/da9052-spi.c
+++ b/drivers/mfd/da9052-spi.c
@@ -38,7 +38,7 @@ static int da9052_spi_probe(struct spi_device *spi)
da9052->dev = &spi->dev;
da9052->chip_irq = spi->irq;
- dev_set_drvdata(&spi->dev, da9052);
+ spi_set_drvdata(spi, da9052);
da9052_regmap_config.read_flag_mask = 1;
da9052_regmap_config.write_flag_mask = 0;
@@ -60,7 +60,7 @@ static int da9052_spi_probe(struct spi_device *spi)
static int da9052_spi_remove(struct spi_device *spi)
{
- struct da9052 *da9052 = dev_get_drvdata(&spi->dev);
+ struct da9052 *da9052 = spi_get_drvdata(spi);
da9052_device_exit(da9052);
return 0;