mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
drivers: thermal: don't reset ops pointer in of-thermal sensor unregister
The thermal zone ops pointer is allocated and initialized during building thermal zone at early boot. The framework expects this variable is valid as long as that thermal zone exist. Later if a sensor is registered to thermal zone and then unregistered the same due to some reason, it resets this thermal zone ops variable. It leads to unexpected behaviour whenever thermal framework tries to use it. Don't reset thermal zone ops variable during of-thermal sensor unregister context. Change-Id: I468cdfe08f4cde3fb1258ca335fe2ee8b457e014 Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
This commit is contained in:
parent
55d1e41a78
commit
9b7dfe02f6
1 changed files with 0 additions and 1 deletions
|
|
@ -1021,7 +1021,6 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
|
|||
pos_tzd->ops->get_temp = NULL;
|
||||
pos_tzd->ops->get_trend = NULL;
|
||||
pos_tzd->ops->set_emul_temp = NULL;
|
||||
pos_tzd->ops = NULL;
|
||||
mutex_unlock(&pos_tzd->lock);
|
||||
}
|
||||
kfree(sens_param->tz_list);
|
||||
|
|
|
|||
Loading…
Reference in a new issue