Skip to content

Commit

Permalink
USB: OHCI: fix build error related to ohci_suspend/resume
Browse files Browse the repository at this point in the history
Commit 9a11899 (USB: OHCI: add missing PCI PM callbacks to
ohci-pci.c) added missing ohci_suspend and ohci_resume callback
pointers, but forgot that these callbacks are declared and defined
only when CONFIG_PM is enabled.

This patch adds a preprocessor conditional to avoid build errors when
PM is disabled.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Meelis Roos <mroos@linux.ee>,
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Aug 26, 2013
1 parent d8dfad3 commit d347404
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/host/ohci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,11 @@ static int __init ohci_pci_init(void)

ohci_init_driver(&ohci_pci_hc_driver, &pci_overrides);

#ifdef CONFIG_PM
/* Entries for the PCI suspend/resume callbacks are special */
ohci_pci_hc_driver.pci_suspend = ohci_suspend;
ohci_pci_hc_driver.pci_resume = ohci_resume;
#endif

return pci_register_driver(&ohci_pci_driver);
}
Expand Down

0 comments on commit d347404

Please sign in to comment.