]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
authorBorislav Petkov <bp@suse.de>
Sat, 26 Nov 2016 16:01:51 +0000 (17:01 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Sun, 4 Mar 2018 15:28:28 +0000 (10:28 -0500)
[ Upstream commit b4aca383f9afb5f84b05de272656e6d4a919d995 ]

Fix:

  drivers/platform/x86/intel_mid_thermal.c:424:12: warning: ‘mid_thermal_resume’
  defined but not used [-Wunused-function]
   static int mid_thermal_resume(struct device *dev)
              ^
  drivers/platform/x86/intel_mid_thermal.c:436:12: warning: ‘mid_thermal_suspend’
  defined but not used [-Wunused-function]
   static int mid_thermal_suspend(struct device *dev)
              ^

which I see during randbuilds here.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Darren Hart <dvhart@infradead.org>
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/platform/x86/intel_mid_thermal.c

index aeb3f786d2f06dc42d7e21dc8131e1786adb5c8d..84273a9797685c6aa51479d9de31efd58f49f6b1 100644 (file)
@@ -416,6 +416,7 @@ static struct thermal_device_info *initialize_sensor(int index)
        return td_info;
 }
 
+#ifdef CONFIG_PM_SLEEP
 /**
  * mid_thermal_resume - resume routine
  * @dev: device structure
@@ -443,6 +444,7 @@ static int mid_thermal_suspend(struct device *dev)
         */
        return configure_adc(0);
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(mid_thermal_pm,
                         mid_thermal_suspend, mid_thermal_resume);