]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: da9052: Use spi_get_drvdata() and spi_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Sat, 6 Apr 2013 06:43:23 +0000 (15:43 +0900)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 9 Apr 2013 10:18:16 +0000 (12:18 +0200)
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>
drivers/mfd/da9052-spi.c

index 61d63b93576c9f3055b2e969ea8983a37f21b0b7..0680bcbc53def93aec02d2783b19a1e46c377280 100644 (file)
@@ -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;