From 30312b407787a49b1b1f6dbda389b7734eb84941 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 23 Sep 2011 14:20:02 -0700 Subject: [PATCH] --- yaml --- r: 265035 b: refs/heads/master c: 0cc47d547d7a482434926331265b3713381b1e60 h: refs/heads/master i: 265033: 9cf48893640b500ebc8cc9428110141eca6fd553 265031: bee31047a5371f1c31b39a763d810291136458ab v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/Makefile | 3 ++- trunk/drivers/usb/host/xhci-pci.c | 4 ++-- trunk/drivers/usb/host/xhci.c | 7 +------ trunk/drivers/usb/host/xhci.h | 3 +++ 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 582bde8e0902..694e7232f687 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 552e0c4f12fef0ad1caf21d2b57ac3a2735edef3 +refs/heads/master: 0cc47d547d7a482434926331265b3713381b1e60 diff --git a/trunk/drivers/usb/host/Makefile b/trunk/drivers/usb/host/Makefile index 624a362f2fee..ed48a5d79e16 100644 --- a/trunk/drivers/usb/host/Makefile +++ b/trunk/drivers/usb/host/Makefile @@ -11,8 +11,9 @@ fhci-y += fhci-mem.o fhci-tds.o fhci-sched.o fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o -xhci-hcd-y := xhci.o xhci-mem.o xhci-pci.o +xhci-hcd-y := xhci.o xhci-mem.o xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o +xhci-hcd-$(CONFIG_PCI) += xhci-pci.o obj-$(CONFIG_USB_WHCI_HCD) += whci/ diff --git a/trunk/drivers/usb/host/xhci-pci.c b/trunk/drivers/usb/host/xhci-pci.c index e2c82d1249c2..9f51f88cc0f5 100644 --- a/trunk/drivers/usb/host/xhci-pci.c +++ b/trunk/drivers/usb/host/xhci-pci.c @@ -320,12 +320,12 @@ static struct pci_driver xhci_pci_driver = { #endif }; -int xhci_register_pci(void) +int __init xhci_register_pci(void) { return pci_register_driver(&xhci_pci_driver); } -void xhci_unregister_pci(void) +void __exit xhci_unregister_pci(void) { pci_unregister_driver(&xhci_pci_driver); } diff --git a/trunk/drivers/usb/host/xhci.c b/trunk/drivers/usb/host/xhci.c index 2409bbe1b223..1ff95a0df576 100644 --- a/trunk/drivers/usb/host/xhci.c +++ b/trunk/drivers/usb/host/xhci.c @@ -4039,16 +4039,13 @@ MODULE_LICENSE("GPL"); static int __init xhci_hcd_init(void) { -#ifdef CONFIG_PCI - int retval = 0; + int retval; retval = xhci_register_pci(); - if (retval < 0) { printk(KERN_DEBUG "Problem registering PCI driver."); return retval; } -#endif /* * Check the compiler generated sizes of structures that must be laid * out in specific ways for hardware access. @@ -4073,8 +4070,6 @@ module_init(xhci_hcd_init); static void __exit xhci_hcd_cleanup(void) { -#ifdef CONFIG_PCI xhci_unregister_pci(); -#endif } module_exit(xhci_hcd_cleanup); diff --git a/trunk/drivers/usb/host/xhci.h b/trunk/drivers/usb/host/xhci.h index ad11c38afe85..3c8fbd2772ea 100644 --- a/trunk/drivers/usb/host/xhci.h +++ b/trunk/drivers/usb/host/xhci.h @@ -1644,6 +1644,9 @@ void xhci_free_command(struct xhci_hcd *xhci, /* xHCI PCI glue */ int xhci_register_pci(void); void xhci_unregister_pci(void); +#else +static inline int xhci_register_pci(void) { return 0; } +static inline void xhci_unregister_pci(void) {} #endif /* xHCI host controller glue */