wm97xx_batery: replace driver_data with dev_get_drvdata()
authorAlexander Beregalov <a.beregalov@gmail.com>
Tue, 23 Jun 2009 13:50:06 +0000 (17:50 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 12 Jul 2009 20:02:10 +0000 (13:02 -0700)
direct access of driver_data is going away.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/power/wm97xx_battery.c

index 8bde92126d34794e6cd58e55f1d715216c92819b..b787335a8419352fa4cef23af9fccd2fd4f508ac 100644 (file)
@@ -33,14 +33,14 @@ static enum power_supply_property *prop;
 
 static unsigned long wm97xx_read_bat(struct power_supply *bat_ps)
 {
-       return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
+       return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
                                        pdata->batt_aux) * pdata->batt_mult /
                                        pdata->batt_div;
 }
 
 static unsigned long wm97xx_read_temp(struct power_supply *bat_ps)
 {
-       return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
+       return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
                                        pdata->temp_aux) * pdata->temp_mult /
                                        pdata->temp_div;
 }