power: battery-charger: fix logical error
Venkat Reddy Talla [Mon, 11 Nov 2013 06:55:40 +0000 (11:55 +0530)]
Fixing logical error in temperature calculation

Bug 1355405

Change-Id: I15920dd424d7114a87a55069a5e1f3a1fb2de6b9
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/328790
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/power/battery-charger-gauge-comm.c

index eb6c14f..4e9a574 100644 (file)
@@ -2,7 +2,7 @@
  * battery-charger-gauge-comm.c -- Communication between battery charger and
  *     battery gauge driver.
  *
- * Copyright (c) 2013, NVIDIA Corporation.
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * Author: Laxman Dewangan <ldewangan@nvidia.com>
  *
@@ -128,7 +128,7 @@ static void battery_charger_thermal_monitor_wq(struct work_struct *work)
 
        if (temperature <= JETI_TEMP_COLD || temperature >= JETI_TEMP_HOT) {
                charger_enable_state = false;
-       } else if (temperature <= JETI_TEMP_COOL &&
+       } else if (temperature <= JETI_TEMP_COOL ||
                                temperature >= JETI_TEMP_WARM) {
                charger_current_half = true;
                battery_thersold_voltage = 4100;