diff options
author | Zhang Rui <rui.zhang@intel.com> | 2019-07-09 09:19:12 -0400 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2019-07-09 09:19:12 -0400 |
commit | 6c395f66e98c895cf3ebf87c0b2fc63b6a57a196 (patch) | |
tree | 404adaeee1c1202c3bf61306e3424c97b6ee7b2c | |
parent | ff9b011ad14319a3189efd033796410a48b23cde (diff) |
drivers: thermal: processor_thermal_device: Fix build warning
As a system sleep callback, proc_thermal_resume() should be defined only
if CONFIG_PM_SLEEP is defined.
This fixes a build warning when CONFIG_PM_SLEEP is not set,
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c:446:12: error: 'proc_thermal_resume' defined but not used [-Werror=unused-function]
static int proc_thermal_resume(struct device *dev)
Fixes: aaba9791fbb4 ("drivers: thermal: processor_thermal: Read PPCC on resume")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r-- | drivers/thermal/intel/int340x_thermal/processor_thermal_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c index a3210f09f366..77dae1e7c3bf 100644 --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c | |||
@@ -443,6 +443,7 @@ static void proc_thermal_pci_remove(struct pci_dev *pdev) | |||
443 | pci_disable_device(pdev); | 443 | pci_disable_device(pdev); |
444 | } | 444 | } |
445 | 445 | ||
446 | #ifdef CONFIG_PM_SLEEP | ||
446 | static int proc_thermal_resume(struct device *dev) | 447 | static int proc_thermal_resume(struct device *dev) |
447 | { | 448 | { |
448 | struct proc_thermal_device *proc_dev; | 449 | struct proc_thermal_device *proc_dev; |
@@ -452,6 +453,9 @@ static int proc_thermal_resume(struct device *dev) | |||
452 | 453 | ||
453 | return 0; | 454 | return 0; |
454 | } | 455 | } |
456 | #else | ||
457 | #define proc_thermal_resume NULL | ||
458 | #endif | ||
455 | 459 | ||
456 | static SIMPLE_DEV_PM_OPS(proc_thermal_pm, NULL, proc_thermal_resume); | 460 | static SIMPLE_DEV_PM_OPS(proc_thermal_pm, NULL, proc_thermal_resume); |
457 | 461 | ||