Skip to contentSkip to conversation

power: supply: charger-manager: Fix typo in condition

PATCH In review [email protected] 2 participants 2 messages Nov 21, 2017 – Dec 1, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: supply: charger-manager: Fix typo in condition

From: Ryosuke Saito <[email protected]>

Should be discharging_max_duration_ms, not charging_max_duration_ms.

---
 drivers/power/supply/charger-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/charger-manager.c +1 -1
index 6502fa7..1de4b44 100644
@@ -578,7 +578,7 @@ static int check_charging_duration(struct charger_manager *cm)
 	} else if (is_ext_pwr_online(cm) && !cm->charger_enabled) {
 		duration = curr - cm->charging_end_time;
 
-		if (duration > desc->charging_max_duration_ms &&
+		if (duration > desc->discharging_max_duration_ms &&
 				is_ext_pwr_online(cm)) {
 			dev_info(cm->dev, "Discharging duration exceed %ums\n",
 				 desc->discharging_max_duration_ms);
Signature · 1 line
2.9.5
#1 lore raw

Hi,

Quoted 6 lines · On Tue, Nov 21, 2017 at 01:27:12PM +0900, [email protected] wrote:

From: Ryosuke Saito <[email protected]>

Should be discharging_max_duration_ms, not charging_max_duration_ms.

---

Thanks, queued.

-- Sebastian

Quoted 19 lines
 drivers/power/supply/charger-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/charger-manager.c +1 -1
index 6502fa7..1de4b44 100644
@@ -578,7 +578,7 @@ static int check_charging_duration(struct charger_manager *cm)
 	} else if (is_ext_pwr_online(cm) && !cm->charger_enabled) {
 		duration = curr - cm->charging_end_time;
 
-		if (duration > desc->charging_max_duration_ms &&
+		if (duration > desc->discharging_max_duration_ms &&
 				is_ext_pwr_online(cm)) {
 			dev_info(cm->dev, "Discharging duration exceed %ums\n",
 				 desc->discharging_max_duration_ms);
Signature · 1 line
2.9.5