Skip to content

Commit 94cc662

Browse files
AlanSterngregkh
authored andcommitted
USB: fix build error when CONFIG_PM_SLEEP isn't enabled
commit 9d89242 upstream. This patch fixes a build error that occurs when CONFIG_PM is enabled and CONFIG_PM_SLEEP isn't: >> drivers/usb/host/ohci-pci.c:294:10: error: 'usb_hcd_pci_pm_ops' undeclared here (not in a function) .pm = &usb_hcd_pci_pm_ops Since the usb_hcd_pci_pm_ops structure is defined and used when CONFIG_PM is enabled, its declaration should not be protected by CONFIG_PM_SLEEP. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ddcc49f commit 94cc662

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/linux/usb/hcd.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ extern int usb_hcd_pci_probe(struct pci_dev *dev,
410410
extern void usb_hcd_pci_remove(struct pci_dev *dev);
411411
extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
412412

413-
#ifdef CONFIG_PM_SLEEP
413+
#ifdef CONFIG_PM
414414
extern const struct dev_pm_ops usb_hcd_pci_pm_ops;
415415
#endif
416416
#endif /* CONFIG_PCI */

0 commit comments

Comments
 (0)