diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-30 14:43:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-15 21:30:27 -0700 |
commit | 1902a9e62ba34a1071407ab61cef626e019a0923 (patch) | |
tree | 082b821299d7a543b8827f571f809e535d3663ed /drivers/mfd/htc-pasic3.c | |
parent | 79510cdbc76265426c6d75326436624393694ea7 (diff) | |
download | linux-3.10-1902a9e62ba34a1071407ab61cef626e019a0923.tar.gz linux-3.10-1902a9e62ba34a1071407ab61cef626e019a0923.tar.bz2 linux-3.10-1902a9e62ba34a1071407ab61cef626e019a0923.zip |
mfd: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/mfd/htc-pasic3.c')
-rw-r--r-- | drivers/mfd/htc-pasic3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c index 386da1566fc..cb73051e43d 100644 --- a/drivers/mfd/htc-pasic3.c +++ b/drivers/mfd/htc-pasic3.c @@ -35,7 +35,7 @@ struct pasic3_data { */ void pasic3_write_register(struct device *dev, u32 reg, u8 val) { - struct pasic3_data *asic = dev->driver_data; + struct pasic3_data *asic = dev_get_drvdata(dev); int bus_shift = asic->bus_shift; void __iomem *addr = asic->mapping + (REG_ADDR << bus_shift); void __iomem *data = asic->mapping + (REG_DATA << bus_shift); @@ -50,7 +50,7 @@ EXPORT_SYMBOL(pasic3_write_register); /* for leds-pasic3 */ */ u8 pasic3_read_register(struct device *dev, u32 reg) { - struct pasic3_data *asic = dev->driver_data; + struct pasic3_data *asic = dev_get_drvdata(dev); int bus_shift = asic->bus_shift; void __iomem *addr = asic->mapping + (REG_ADDR << bus_shift); void __iomem *data = asic->mapping + (REG_DATA << bus_shift); |