diff options
author | Ram Chandrasekar <rkumbako@codeaurora.org> | 2015-01-06 17:46:41 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:08:27 -0700 |
commit | a651fa6a5688c8e7234e094309992e2454e95e52 (patch) | |
tree | 2bbc7c2d5e62b2ebe3d59b0bd28d2982ef2d41f7 /drivers | |
parent | 14b0886b043fab90050f26bee9ea0ead073f1f2b (diff) |
Revert "thermal-core: Add a lock to tz_notify_trip()"
This reverts commit 383ac33a1e2ab375e41387cf05132533ae178c36.
The temperature sensor drivers registering with thermal
core framework can call the thermal_sensor_trip() API in
interrupt context. This might cause potential thermal
reset issues because the interrupt might be disabled till
this API returns.
Change-Id: I8d6dfc55386fbdea8e51e7abbb0e7632208c6c38
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/thermal/thermal_core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index e66db0e030ea..a82095cfdd56 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -383,7 +383,7 @@ static __ref int sensor_sysfs_notify(void *data) return ret; } -/* Should not be called in an interrupt context. +/* May be called in an interrupt context. * Do NOT call sensor_set_trip from this function */ int thermal_sensor_trip(struct thermal_zone_device *tz, @@ -399,8 +399,6 @@ int thermal_sensor_trip(struct thermal_zone_device *tz, if (list_empty(&tz->sensor.threshold_list)) return 0; - mutex_lock(&tz->sensor.lock); - list_for_each_entry_safe(pos, var, &tz->sensor.threshold_list, list) { if ((pos->trip != trip) || (!pos->active)) continue; @@ -418,8 +416,6 @@ int thermal_sensor_trip(struct thermal_zone_device *tz, } } - mutex_unlock(&tz->sensor.lock); - schedule_work(&tz->sensor.work); return ret; |