MLK-21076-2 thermal: imx: Fix build warning when CONFIG_PM_SLEEP=n
authorAnson Huang <Anson.Huang@nxp.com>
Tue, 23 Jul 2019 01:39:35 +0000 (09:39 +0800)
committerAnson Huang <Anson.Huang@nxp.com>
Tue, 23 Jul 2019 07:53:13 +0000 (15:53 +0800)
Fix below build warning when CONFIG_PM_SLEEP=n:

drivers/thermal/imx_thermal.c:243:12: warning: 'imx7_lpsr_save'
defined but not used [-Wunused-variable]

 static u32 imx7_lpsr_save[2];
            ^~~~~~~~~~~~~~
  AR      drivers/spi/built-in.o

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit e4a858fb57a2460af3c615647828f9f32e532097)

drivers/thermal/imx_thermal.c

index 074f1d3..26fd81f 100644 (file)
@@ -242,7 +242,10 @@ struct imx_thermal_data {
 
 static struct imx_thermal_data *imx_thermal_data;
 static int skip_finish_check;
+
+#ifdef CONFIG_PM_SLEEP
 static u32 imx7_lpsr_save[2];
+#endif
 
 static void imx_set_panic_temp(struct imx_thermal_data *data,
                               int panic_temp)