lkml.org 
[lkml]   [2013]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/3] Thermal: core: Ask .get_trip_temp() to register thermal zone device.
Date


> -----Original Message-----
> From: Jonghwa Lee [mailto:jonghwa3.lee@samsung.com]
> Sent: Saturday, May 18, 2013 5:50 PM
> To: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Zhang, Rui; Eduardo Valentin; Amit
> Dinel Kachhap; Jonghwa Lee; MyungJoo Ham
> Subject: [PATCH 1/3] Thermal: core: Ask .get_trip_temp() to register
> thermal zone device.
> Importance: High
>
> 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>

Applied to thermal -next.

Thanks,
rui
> ---
> drivers/thermal/thermal_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_core.c
> b/drivers/thermal/thermal_core.c index d755440..f753f48 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -1624,7 +1624,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);
> --
> 1.7.9.5



\
 
 \ /
  Last update: 2013-05-20 18:42    [W:0.908 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site