From: anarsoul@gmail.com (Vasily Khoruzhick)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] z2-battery: Fix count of properties
Date: Fri, 11 Mar 2011 15:09:32 +0200 [thread overview]
Message-ID: <1299848972-25596-1-git-send-email-anarsoul@gmail.com> (raw)
In-Reply-To: <4D7A1181.2000802@ru.mvista.com>
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>
---
v2: Align comment properly
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 81304c0..2a9ab89 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
next prev parent reply other threads:[~2011-03-11 13:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Vasily Khoruzhick [this message]
2011-03-11 21:36 ` [PATCH v2] " Marek Vasut
2011-03-16 13:55 ` Anton Vorontsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1299848972-25596-1-git-send-email-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).