power: pm8921-charger: Fix thermal mitigation condition
Once thermald writes to the kernel parameter the charger driver
checks if the battery is in cool or warm zones and then checks
the mitigation level with a bitwise AND NOT condition if there
is a thermal mitigation table present.
Fix this by removing the NOT condition so thermal mitigation can
take place.
Change-Id: Ib79fa09aa3d0b2de413450bbd2d4069fc89a5f2d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
diff --git a/drivers/power/pm8921-charger.c b/drivers/power/pm8921-charger.c
index ef97389..5bf9c76 100644
--- a/drivers/power/pm8921-charger.c
+++ b/drivers/power/pm8921-charger.c
@@ -1975,7 +1975,7 @@
if (chip->is_bat_warm)
chg_current = min(chg_current, chip->warm_bat_chg_current);
- if (thermal_mitigation != 0 && !chip->thermal_mitigation)
+ if (thermal_mitigation != 0 && chip->thermal_mitigation)
chg_current = min(chg_current,
chip->thermal_mitigation[thermal_mitigation]);