projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8d878d
)
z2_battery: Fix count of properties
author
Vasily Khoruzhick
<
[email protected]
>
Fri, 11 Mar 2011 13:09:32 +0000
(15:09 +0200)
committer
Anton Vorontsov
<
[email protected]
>
Wed, 16 Mar 2011 13:39:54 +0000
(16:39 +0300)
PROP_STATUS property was not counted, as result VOLTAGE_MIN property is
missing in sysfs. Fix it.
Signed-off-by: Vasily Khoruzhick <
[email protected]
>
Acked-by: Marek Vasut <
[email protected]
>
Signed-off-by: Anton Vorontsov <
[email protected]
>
drivers/power/z2_battery.c
patch
|
blob
|
history
diff --git
a/drivers/power/z2_battery.c
b/drivers/power/z2_battery.c
index 81304c0bb9d3b46e717c3031553d4f481ce434f8..2a9ab89f83b8af99264495663516694fc2afee25 100644
(file)
--- a/
drivers/power/z2_battery.c
+++ b/
drivers/power/z2_battery.c
@@
-134,6
+134,8
@@
static int z2_batt_ps_init(struct z2_charger *charger, int props)
enum power_supply_property *prop;
struct z2_battery_info *info = charger->info;
+ if (info->charge_gpio >= 0)
+ props++; /* POWER_SUPPLY_PROP_STATUS */
if (info->batt_tech >= 0)
props++; /* POWER_SUPPLY_PROP_TECHNOLOGY */
if (info->batt_I2C_reg >= 0)