mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-27 06:01:12 +00:00
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>
This commit is contained in:
parent
0c0d2ab069
commit
1b1ba09c39
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user