aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonghwa Lee <jonghwa3.lee@samsung.com>2013-05-18 05:50:26 -0400
committerZhang Rui <rui.zhang@intel.com>2013-05-27 22:04:22 -0400
commit83720d0b79618cd07c955ef1204c9cb0acb614a5 (patch)
tree823318b9b84251bb81b0018e0960c50df5d6ec91
parent42a5bf507d7f7ecbf606eb392dd9d2e4d009c36b (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 <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>
-rw-r--r--drivers/thermal/thermal_core.c2
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,
1628 if (!ops || !ops->get_temp) 1628 if (!ops || !ops->get_temp)
1629 return ERR_PTR(-EINVAL); 1629 return ERR_PTR(-EINVAL);
1630 1630
1631 if (trips > 0 && !ops->get_trip_type) 1631 if (trips > 0 && (!ops->get_trip_type || !ops->get_trip_temp))
1632 return ERR_PTR(-EINVAL); 1632 return ERR_PTR(-EINVAL);
1633 1633
1634 tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL); 1634 tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);