linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] z2-battery: Fix count of properties
@ 2011-03-11 10:03 Vasily Khoruzhick
  2011-03-11 12:11 ` Sergei Shtylyov
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2011-03-11 10:03 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/power/z2_battery.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c
index e5ed52d..551d7bf 100644
--- 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)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-16 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-11 10:03 [PATCH] z2-battery: Fix count of properties Vasily Khoruzhick
2011-03-11 12:11 ` Sergei Shtylyov
2011-03-11 13:09   ` [PATCH v2] " Vasily Khoruzhick
2011-03-11 21:36     ` Marek Vasut
2011-03-16 13:55       ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).