Skip to content

Commit

Permalink
z2_battery: Fix count of properties
Browse files Browse the repository at this point in the history
PROP_STATUS property was not counted, as result VOLTAGE_MIN property is
missing in sysfs. Fix it.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
  • Loading branch information
Vasily Khoruzhick authored and Anton Vorontsov committed Mar 16, 2011
1 parent f8d878d commit a223246
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/power/z2_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a223246

Please sign in to comment.