mirror of https://gitee.com/openkylin/linux.git
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: aaba9791fb
("drivers: thermal: processor_thermal: Read PPCC on resume")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
This commit is contained in:
parent
ff9b011ad1
commit
6c395f66e9
|
@ -443,6 +443,7 @@ static void proc_thermal_pci_remove(struct pci_dev *pdev)
|
|||
pci_disable_device(pdev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int proc_thermal_resume(struct device *dev)
|
||||
{
|
||||
struct proc_thermal_device *proc_dev;
|
||||
|
@ -452,6 +453,9 @@ static int proc_thermal_resume(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#define proc_thermal_resume NULL
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(proc_thermal_pm, NULL, proc_thermal_resume);
|
||||
|
||||
|
|
Loading…
Reference in New Issue