1 From 0b729a98127ef045096edf20dfe5c4eadac21d44 Mon Sep 17 00:00:00 2001
2 From: Sascha Hauer <s.hauer@pengutronix.de>
3 Date: Wed, 13 May 2015 10:52:34 +0200
4 Subject: [PATCH 15/76] thermal: inline only once used function
6 Inline update_temperature into its only caller to make the code
9 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
10 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
12 drivers/thermal/thermal_core.c | 17 +++++------------
13 1 file changed, 5 insertions(+), 12 deletions(-)
15 --- a/drivers/thermal/thermal_core.c
16 +++ b/drivers/thermal/thermal_core.c
17 @@ -450,9 +450,12 @@ exit:
19 EXPORT_SYMBOL_GPL(thermal_zone_get_temp);
21 -static void update_temperature(struct thermal_zone_device *tz)
22 +void thermal_zone_device_update(struct thermal_zone_device *tz)
25 + int temp, ret, count;
27 + if (!tz->ops->get_temp)
30 ret = thermal_zone_get_temp(tz, &temp);
32 @@ -471,16 +474,6 @@ static void update_temperature(struct th
33 trace_thermal_temperature(tz);
34 dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n",
35 tz->last_temperature, tz->temperature);
38 -void thermal_zone_device_update(struct thermal_zone_device *tz)
42 - if (!tz->ops->get_temp)
45 - update_temperature(tz);
47 for (count = 0; count < tz->trips; count++)
48 handle_thermal_trip(tz, count);