mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
usb: dwc3: pci: fix build warning on !PM_SLEEP
When building a kernel with CONFIG_PM_SLEEP=n, we
get the following warning:
drivers/usb/dwc3/dwc3-pci.c:253:12: warning: 'dwc3_pci_pm_dummy' defined but not used
In order to fix this, we should only define
dwc3_pci_pm_dummy() when CONFIG_PM_SLEEP is defined.
Fixes: f6c274e11e
("usb: dwc3: pci: runtime_resume child device")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
3ff488ab60
commit
696118c016
@ -249,7 +249,9 @@ static int dwc3_pci_runtime_resume(struct device *dev)
|
||||
|
||||
return pm_runtime_get(&dwc3->dev);
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int dwc3_pci_pm_dummy(struct device *dev)
|
||||
{
|
||||
/*
|
||||
@ -262,7 +264,7 @@ static int dwc3_pci_pm_dummy(struct device *dev)
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
||||
static struct dev_pm_ops dwc3_pci_dev_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_pm_dummy, dwc3_pci_pm_dummy)
|
||||
|
Loading…
Reference in New Issue
Block a user