diff options
author | Jonghwa Lee <jonghwa3.lee@samsung.com> | 2013-05-18 09:50:26 +0000 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2013-05-28 10:04:22 +0800 |
commit | 83720d0b79618cd07c955ef1204c9cb0acb614a5 (patch) | |
tree | 823318b9b84251bb81b0018e0960c50df5d6ec91 /drivers/thermal/thermal_core.c | |
parent | 42a5bf507d7f7ecbf606eb392dd9d2e4d009c36b (diff) | |
download | op-kernel-dev-83720d0b79618cd07c955ef1204c9cb0acb614a5.zip op-kernel-dev-83720d0b79618cd07c955ef1204c9cb0acb614a5.tar.gz |
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 <jonghwa3.lee@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/thermal_core.c')
-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 1067fb0..e56ded5 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); |