lkml.org 
[lkml]   [2013]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] USB: OHCI: fix build error related to ohci_suspend/resume
Commit 9a11899c5e69 (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.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

---


[as1702]


drivers/usb/host/ohci-pci.c | 2 ++
1 file changed, 2 insertions(+)

Index: usb-3.11/drivers/usb/host/ohci-pci.c
===================================================================
--- usb-3.11.orig/drivers/usb/host/ohci-pci.c
+++ usb-3.11/drivers/usb/host/ohci-pci.c
@@ -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);
}



\
 
 \ /
  Last update: 2013-08-26 17:21    [W:0.053 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site