Skip to content

Commit

Permalink
power: supply: charger-manager: Fix typo in condition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ryosuke Saito authored and Sebastian Reichel committed Dec 1, 2017
1 parent 348c7cf commit f46b151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/charger-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f46b151

Please sign in to comment.