aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/wm97xx_battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c
index c552082c8128..f2bfd296dbae 100644
--- a/drivers/power/wm97xx_battery.c
+++ b/drivers/power/wm97xx_battery.c
@@ -36,7 +36,7 @@ static unsigned long wm97xx_read_bat(struct power_supply *bat_ps)
36 struct wm97xx_pdata *wmdata = bat_ps->dev->parent->platform_data; 36 struct wm97xx_pdata *wmdata = bat_ps->dev->parent->platform_data;
37 struct wm97xx_batt_pdata *pdata = wmdata->batt_pdata; 37 struct wm97xx_batt_pdata *pdata = wmdata->batt_pdata;
38 38
39 return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data, 39 return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
40 pdata->batt_aux) * pdata->batt_mult / 40 pdata->batt_aux) * pdata->batt_mult /
41 pdata->batt_div; 41 pdata->batt_div;
42} 42}
@@ -46,7 +46,7 @@ static unsigned long wm97xx_read_temp(struct power_supply *bat_ps)
46 struct wm97xx_pdata *wmdata = bat_ps->dev->parent->platform_data; 46 struct wm97xx_pdata *wmdata = bat_ps->dev->parent->platform_data;
47 struct wm97xx_batt_pdata *pdata = wmdata->batt_pdata; 47 struct wm97xx_batt_pdata *pdata = wmdata->batt_pdata;
48 48
49 return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data, 49 return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
50 pdata->temp_aux) * pdata->temp_mult / 50 pdata->temp_aux) * pdata->temp_mult /
51 pdata->temp_div; 51 pdata->temp_div;
52} 52}