power: battery-gauge: remove mutex lock while reading current limit
Venkat Reddy Talla [Tue, 30 Jun 2015 06:53:13 +0000 (11:53 +0530)]
Removing mutex lock while reading input current limit.
mutex lock cuasing dead lock situation in suspend resume test.
while reading input current limit, mutex lock is not required
as no parameter is updated in this api.

Bug 200118347

Change-Id: I1db7adbe545eabfbfa4172d42b13571669ef62c7
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/763994
(cherry picked from commit b2f497d0b677c97f5b8027d4a56f9cac130e41cd)
Reviewed-on: http://git-master/r/769834
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

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

index 302646a..7a3adf2 100644 (file)
@@ -615,8 +615,6 @@ int battery_gauge_get_input_current_limit(struct battery_gauge_dev *bg_dev)
        if (!bg_dev)
                return -EINVAL;
 
-       mutex_lock(&charger_gauge_list_mutex);
-
        list_for_each_entry(node, &charger_list, list) {
                if (node->cell_id != bg_dev->cell_id)
                        continue;
@@ -624,7 +622,6 @@ int battery_gauge_get_input_current_limit(struct battery_gauge_dev *bg_dev)
                        ret = node->ops->get_input_current_limit(node);
        }
 
-       mutex_unlock(&charger_gauge_list_mutex);
        return ret;
 }
 EXPORT_SYMBOL_GPL(battery_gauge_get_input_current_limit);