summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/charger-manager.c
diff options
context:
space:
mode:
authorRyosuke Saito2017-11-21 05:27:12 +0100
committerSebastian Reichel2017-12-01 16:14:06 +0100
commitf46b151ede8668cb824a836e82303e1123f5f9f6 (patch)
treeb472d84bfc6c1b8c7561281c5c555688d1e23346 /drivers/power/supply/charger-manager.c
parentpower: reset: zx-reboot: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE (diff)
downloadkernel-qcow2-linux-f46b151ede8668cb824a836e82303e1123f5f9f6.tar.gz
kernel-qcow2-linux-f46b151ede8668cb824a836e82303e1123f5f9f6.tar.xz
kernel-qcow2-linux-f46b151ede8668cb824a836e82303e1123f5f9f6.zip
power: supply: charger-manager: Fix typo in condition
Should be discharging_max_duration_ms, not charging_max_duration_ms. Signed-off-by: Ryosuke Saito <raitosyo@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power/supply/charger-manager.c')
-rw-r--r--drivers/power/supply/charger-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 6502fa7c2106..1de4b4493824 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);