aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-07-27 12:22:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-07-27 12:22:55 -0400
commit02e7cce2bc3ac82b971d1efe489f23ca0b6e1d4a (patch)
tree8a2579a63dafc1e7a47c0d9281e315dd6d9568d7 /drivers
parenta376bca61096c7a79393e8125b7ad4757ccff19c (diff)
parenteb9650d6d989f24f21232a055d8fd45f1a9dcf99 (diff)
Merge git://git.infradead.org/users/cbou/battery-2.6.35
* git://git.infradead.org/users/cbou/battery-2.6.35: ds2782_battery: Rename get_current to fix build failure / name conflict
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/ds2782_battery.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
index 2afbeec8b791..84d3c43cf2bc 100644
--- a/drivers/power/ds2782_battery.c
+++ b/drivers/power/ds2782_battery.c
@@ -43,10 +43,9 @@
43struct ds278x_info; 43struct ds278x_info;
44 44
45struct ds278x_battery_ops { 45struct ds278x_battery_ops {
46 int (*get_current)(struct ds278x_info *info, int *current_uA); 46 int (*get_battery_current)(struct ds278x_info *info, int *current_uA);
47 int (*get_voltage)(struct ds278x_info *info, int *voltage_uA); 47 int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uA);
48 int (*get_capacity)(struct ds278x_info *info, int *capacity_uA); 48 int (*get_battery_capacity)(struct ds278x_info *info, int *capacity_uA);
49
50}; 49};
51 50
52#define to_ds278x_info(x) container_of(x, struct ds278x_info, battery) 51#define to_ds278x_info(x) container_of(x, struct ds278x_info, battery)
@@ -213,11 +212,11 @@ static int ds278x_get_status(struct ds278x_info *info, int *status)
213 int current_uA; 212 int current_uA;
214 int capacity; 213 int capacity;
215 214
216 err = info->ops->get_current(info, &current_uA); 215 err = info->ops->get_battery_current(info, &current_uA);
217 if (err) 216 if (err)
218 return err; 217 return err;
219 218
220 err = info->ops->get_capacity(info, &capacity); 219 err = info->ops->get_battery_capacity(info, &capacity);
221 if (err) 220 if (err)
222 return err; 221 return err;
223 222
@@ -246,15 +245,15 @@ static int ds278x_battery_get_property(struct power_supply *psy,
246 break; 245 break;
247 246
248 case POWER_SUPPLY_PROP_CAPACITY: 247 case POWER_SUPPLY_PROP_CAPACITY:
249 ret = info->ops->get_capacity(info, &val->intval); 248 ret = info->ops->get_battery_capacity(info, &val->intval);
250 break; 249 break;
251 250
252 case POWER_SUPPLY_PROP_VOLTAGE_NOW: 251 case POWER_SUPPLY_PROP_VOLTAGE_NOW:
253 ret = info->ops->get_voltage(info, &val->intval); 252 ret = info->ops->get_battery_voltage(info, &val->intval);
254 break; 253 break;
255 254
256 case POWER_SUPPLY_PROP_CURRENT_NOW: 255 case POWER_SUPPLY_PROP_CURRENT_NOW:
257 ret = info->ops->get_current(info, &val->intval); 256 ret = info->ops->get_battery_current(info, &val->intval);
258 break; 257 break;
259 258
260 case POWER_SUPPLY_PROP_TEMP: 259 case POWER_SUPPLY_PROP_TEMP:
@@ -307,14 +306,14 @@ enum ds278x_num_id {
307 306
308static struct ds278x_battery_ops ds278x_ops[] = { 307static struct ds278x_battery_ops ds278x_ops[] = {
309 [DS2782] = { 308 [DS2782] = {
310 .get_current = ds2782_get_current, 309 .get_battery_current = ds2782_get_current,
311 .get_voltage = ds2782_get_voltage, 310 .get_battery_voltage = ds2782_get_voltage,
312 .get_capacity = ds2782_get_capacity, 311 .get_battery_capacity = ds2782_get_capacity,
313 }, 312 },
314 [DS2786] = { 313 [DS2786] = {
315 .get_current = ds2786_get_current, 314 .get_battery_current = ds2786_get_current,
316 .get_voltage = ds2786_get_voltage, 315 .get_battery_voltage = ds2786_get_voltage,
317 .get_capacity = ds2786_get_capacity, 316 .get_battery_capacity = ds2786_get_capacity,
318 } 317 }
319}; 318};
320 319