Commit 02e7cce2bc3ac82b971d1efe489f23ca0b6e1d4a
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
Showing 1 changed file Side-by-side Diff
drivers/power/ds2782_battery.c
... | ... | @@ -43,10 +43,9 @@ |
43 | 43 | struct ds278x_info; |
44 | 44 | |
45 | 45 | struct ds278x_battery_ops { |
46 | - int (*get_current)(struct ds278x_info *info, int *current_uA); | |
47 | - int (*get_voltage)(struct ds278x_info *info, int *voltage_uA); | |
48 | - int (*get_capacity)(struct ds278x_info *info, int *capacity_uA); | |
49 | - | |
46 | + int (*get_battery_current)(struct ds278x_info *info, int *current_uA); | |
47 | + int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uA); | |
48 | + int (*get_battery_capacity)(struct ds278x_info *info, int *capacity_uA); | |
50 | 49 | }; |
51 | 50 | |
52 | 51 | #define to_ds278x_info(x) container_of(x, struct ds278x_info, battery) |
53 | 52 | |
... | ... | @@ -213,11 +212,11 @@ |
213 | 212 | int current_uA; |
214 | 213 | int capacity; |
215 | 214 | |
216 | - err = info->ops->get_current(info, ¤t_uA); | |
215 | + err = info->ops->get_battery_current(info, ¤t_uA); | |
217 | 216 | if (err) |
218 | 217 | return err; |
219 | 218 | |
220 | - err = info->ops->get_capacity(info, &capacity); | |
219 | + err = info->ops->get_battery_capacity(info, &capacity); | |
221 | 220 | if (err) |
222 | 221 | return err; |
223 | 222 | |
224 | 223 | |
225 | 224 | |
... | ... | @@ -246,15 +245,15 @@ |
246 | 245 | break; |
247 | 246 | |
248 | 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 | 249 | break; |
251 | 250 | |
252 | 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 | 253 | break; |
255 | 254 | |
256 | 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 | 257 | break; |
259 | 258 | |
260 | 259 | case POWER_SUPPLY_PROP_TEMP: |
261 | 260 | |
... | ... | @@ -307,14 +306,14 @@ |
307 | 306 | |
308 | 307 | static struct ds278x_battery_ops ds278x_ops[] = { |
309 | 308 | [DS2782] = { |
310 | - .get_current = ds2782_get_current, | |
311 | - .get_voltage = ds2782_get_voltage, | |
312 | - .get_capacity = ds2782_get_capacity, | |
309 | + .get_battery_current = ds2782_get_current, | |
310 | + .get_battery_voltage = ds2782_get_voltage, | |
311 | + .get_battery_capacity = ds2782_get_capacity, | |
313 | 312 | }, |
314 | 313 | [DS2786] = { |
315 | - .get_current = ds2786_get_current, | |
316 | - .get_voltage = ds2786_get_voltage, | |
317 | - .get_capacity = ds2786_get_capacity, | |
314 | + .get_battery_current = ds2786_get_current, | |
315 | + .get_battery_voltage = ds2786_get_voltage, | |
316 | + .get_battery_capacity = ds2786_get_capacity, | |
318 | 317 | } |
319 | 318 | }; |
320 | 319 |