diff options
author | Jonghwa Lee <[email protected]> | 2013-05-18 09:50:26 +0000 |
---|---|---|
committer | Zhang Rui <[email protected]> | 2013-05-28 10:04:22 +0800 |
commit | 83720d0b79618cd07c955ef1204c9cb0acb614a5 (patch) | |
tree | 823318b9b84251bb81b0018e0960c50df5d6ec91 | |
parent | 42a5bf507d7f7ecbf606eb392dd9d2e4d009c36b (diff) |
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]>
-rw-r--r-- | drivers/thermal/thermal_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 1067fb0107b9..e56ded5984b5 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -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); |