aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2010-04-27 09:18:22 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-05-02 16:02:56 -0400
commit06b9e650ce5eaf14ac1486b2f05baaf2ba22ad22 (patch)
tree5ab82cff7ea81237f55393bd7c2dcb974ed731d9 /drivers/power
parentb1458fb57de03b19296cac70e9455b05912782b5 (diff)
tosa_battery: Fix build error due to direct driver_data usage
The driver isn't buildable since 2.6.32 (i.e. commit b4028437 "Driver core: move dev_get/set_drvdata to drivers/base/dd.c"): CC tosa_battery.o tosa_battery.c: In function 'tosa_read_bat': tosa_battery.c:64: error: 'struct device' has no member named 'driver_data' tosa_battery.c: In function 'tosa_read_temp': tosa_battery.c:84: error: 'struct device' has no member named 'driver_data' Nowadays we must not access driver_data directly, use dev_get_drvdata() instead. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/tosa_battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
index 2eab35aab311..ee04936b2db5 100644
--- a/drivers/power/tosa_battery.c
+++ b/drivers/power/tosa_battery.c
@@ -61,7 +61,7 @@ static unsigned long tosa_read_bat(struct tosa_bat *bat)
61 mutex_lock(&bat_lock); 61 mutex_lock(&bat_lock);
62 gpio_set_value(bat->gpio_bat, 1); 62 gpio_set_value(bat->gpio_bat, 1);
63 msleep(5); 63 msleep(5);
64 value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, 64 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy.dev->parent),
65 bat->adc_bat); 65 bat->adc_bat);
66 gpio_set_value(bat->gpio_bat, 0); 66 gpio_set_value(bat->gpio_bat, 0);
67 mutex_unlock(&bat_lock); 67 mutex_unlock(&bat_lock);
@@ -81,7 +81,7 @@ static unsigned long tosa_read_temp(struct tosa_bat *bat)
81 mutex_lock(&bat_lock); 81 mutex_lock(&bat_lock);
82 gpio_set_value(bat->gpio_temp, 1); 82 gpio_set_value(bat->gpio_temp, 1);
83 msleep(5); 83 msleep(5);
84 value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, 84 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy.dev->parent),
85 bat->adc_temp); 85 bat->adc_temp);
86 gpio_set_value(bat->gpio_temp, 0); 86 gpio_set_value(bat->gpio_temp, 0);
87 mutex_unlock(&bat_lock); 87 mutex_unlock(&bat_lock);