diff mbox

power: generic-adc-battery: Fix power_supply_property returned value

Message ID 1425842480-8746-1-git-send-email-nicolassaenzj@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Nicolas Saenz Julienne March 8, 2015, 7:21 p.m. UTC
From: Nicolas Saenz Julienne <nicolassaenzj@gmail.com>

The POWER_SUPPLY_PROP_STATUS case in gab_get_property() wasn't providing any
value.

Signed-off-by: Nicolas Saenz Julienne <nicolassaenzj@gmail.com>
---
 drivers/power/generic-adc-battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sebastian Reichel March 9, 2015, 1:54 a.m. UTC | #1
Hi,

On Sun, Mar 08, 2015 at 07:21:20PM +0000, nicolassaenzj@gmail.com wrote:
> From: Nicolas Saenz Julienne <nicolassaenzj@gmail.com>
> 
> The POWER_SUPPLY_PROP_STATUS case in gab_get_property() wasn't providing any
> value.

Thanks, queued:

http://git.infradead.org/battery-2.6.git/commit/0595439a0a8740f776a0ae367a4c7f243add24ec

-- Sebastian
diff mbox

Patch

diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
index d72733e..0a566ac 100644
--- a/drivers/power/generic-adc-battery.c
+++ b/drivers/power/generic-adc-battery.c
@@ -159,7 +159,7 @@  static int gab_get_property(struct power_supply *psy,
 
 	switch (psp) {
 	case POWER_SUPPLY_PROP_STATUS:
-		gab_get_status(adc_bat);
+		val->intval = gab_get_status(adc_bat);
 		break;
 	case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN:
 		val->intval = 0;