From: Zhang Rui Date: Wed, 6 Feb 2013 06:02:12 +0000 (+0800) Subject: Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5e20b2e51dd13c569ea1ff65c2a57d00a84a81b0;p=linux.git Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared Signed-off-by: Zhang Rui --- diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 0675687c6de85..6472e7e9f9690 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -381,9 +381,12 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) static int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp) { - int ret = 0, count; + int ret = 0; +#ifdef CONFIG_THERMAL_EMULATION + int count; unsigned long crit_temp = -1UL; enum thermal_trip_type type; +#endif mutex_lock(&tz->lock);