mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Thermal: core: Ask .get_trip_temp() to register thermal zone device.
This patch adds a requirement needing .get_trip_temp() callback function for registering thermal zone device. This function is used when thermal zone is updated and essential where thermal core handles thermal trip based only polling way not hw interrupt. Signed-off-by: Jonghwa Lee <[email protected]> Signed-off-by: MyungJoo Ham <[email protected]> Acked-by: Durgadoss R <[email protected]> Signed-off-by: Zhang Rui <[email protected]>
This commit is contained in:
parent
42a5bf507d
commit
83720d0b79
1 changed files with 1 additions and 1 deletions
|
|
@ -1628,7 +1628,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
|
|||
if (!ops || !ops->get_temp)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
if (trips > 0 && !ops->get_trip_type)
|
||||
if (trips > 0 && (!ops->get_trip_type || !ops->get_trip_temp))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue