Explorar o código

Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Zhang Rui %!s(int64=12) %!d(string=hai) anos
pai
achega
5e20b2e51d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      drivers/thermal/thermal_sys.c

+ 4 - 1
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);