From: Ryosuke Saito Date: Tue, 21 Nov 2017 04:27:12 +0000 (+0900) Subject: power: supply: charger-manager: Fix typo in condition X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f46b151ede8668cb824a836e82303e1123f5f9f6;p=linux.git power: supply: charger-manager: Fix typo in condition Should be discharging_max_duration_ms, not charging_max_duration_ms. Signed-off-by: Ryosuke Saito Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index 6502fa7c21064..1de4b44938241 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -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);