Skip to contentSkip to conversation

ds2782: Fix ds2782_get_capacity return value

PATCH Applied Ryan Mallon 3 participants 4 messages Jun 15, 2010 – Jun 22, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ds2782: Fix ds2782_get_capacity return value

The ds2782_get_capacity function should return 0 on success, not the capacity value.

---
 drivers/power/ds2782_battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/ds2782_battery.c +1 -1
index d762a0c..2afbeec 100644
@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
 	if (err)
 		return err;
 	*capacity = raw;
-	return raw;
+	return 0;
 }
 
 static int ds2786_get_current(struct ds278x_info *info, int *current_uA)
Signature · 1 line
1.5.5.1
#1 lore raw
Quoted 13 lines · Ryan Mallon

The ds2782_get_capacity function should return 0 on success, not the capacity value.

---
 drivers/power/ds2782_battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/ds2782_battery.c +0 -0
index d762a0c..2afbeec 100644

drivers/power/ds2782_battery.c static int ds2782_get_capacity(struct ds278x_info *info, int *capacity) · line 169

Quoted 8 lines
drivers/power/ds2782_battery.c +1 -1
@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
 	if (err)
 		return err;
 	*capacity = raw;
-	return raw;
+	return 0;
 }
 
 static int ds2786_get_current(struct ds278x_info *info, int *current_uA)

Ping, Anton?

~Ryan

Signature · 7 lines
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
[email protected]         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934
#2 lore raw
Quoted 21 lines · Ryan Mallon
Quoted 20 lines · Ryan Mallon

The ds2782_get_capacity function should return 0 on success, not the capacity value.

---
 drivers/power/ds2782_battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/ds2782_battery.c +1 -1
index d762a0c..2afbeec 100644
@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
 	if (err)
 		return err;
 	*capacity = raw;
-	return raw;
+	return 0;
 }
 
Quoted 3 lines

drivers/power/ds2782_battery.c static int ds2782_get_capacity(struct ds278x_info *info, int *capacity) · line 169

Quoted 1 line
drivers/power/ds2782_battery.c +0 -0
 static int ds2786_get_current(struct ds278x_info *info, int *current_uA)

Ping, Anton?

Applied to battery-2.6.35.git, thanks!

#3 lore raw
In reply to Ryan Mallon

confirm

Quoted 41 lines · Ryan Mallon
Quoted 13 lines · Ryan Mallon

The ds2782_get_capacity function should return 0 on success, not the capacity value.

---
 drivers/power/ds2782_battery.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/ds2782_battery.c +0 -0
index d762a0c..2afbeec 100644

drivers/power/ds2782_battery.c static int ds2782_get_capacity(struct ds278x_info *info, int *capacity) · line 169

Quoted 8 lines
drivers/power/ds2782_battery.c +1 -1
@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
       if (err)
               return err;
       *capacity = raw;
-     return raw;
+     return 0;
  }
 
  static int ds2786_get_current(struct ds278x_info *info, int *current_uA)

Ping, Anton?

~Ryan

--
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon                     5 Amuri Park, 404 Barbadoes St [email protected]           PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com     New Zealand
Phone: +64 3 3779127            Freecall: Australia 1800 148 751
Fax:   +64 3 3779135                      USA 1800 261 2934
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/