Skip to content

Commit 696118c

Browse files
author
Felipe Balbi
committed
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: f6c274e ("usb: dwc3: pci: runtime_resume child device") Reported-by: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 3ff488a commit 696118c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/usb/dwc3/dwc3-pci.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ static int dwc3_pci_runtime_resume(struct device *dev)
249249

250250
return pm_runtime_get(&dwc3->dev);
251251
}
252+
#endif /* CONFIG_PM */
252253

254+
#ifdef CONFIG_PM_SLEEP
253255
static int dwc3_pci_pm_dummy(struct device *dev)
254256
{
255257
/*
@@ -262,7 +264,7 @@ static int dwc3_pci_pm_dummy(struct device *dev)
262264
*/
263265
return 0;
264266
}
265-
#endif /* CONFIG_PM */
267+
#endif /* CONFIG_PM_SLEEP */
266268

267269
static struct dev_pm_ops dwc3_pci_dev_pm_ops = {
268270
SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_pm_dummy, dwc3_pci_pm_dummy)

0 commit comments

Comments
 (0)