diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/Makefile | 3 | ||||
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 7 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 3 |
4 files changed, 8 insertions, 9 deletions
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 624a362f2fee..ed48a5d79e16 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile | |||
@@ -11,8 +11,9 @@ fhci-y += fhci-mem.o fhci-tds.o fhci-sched.o | |||
11 | 11 | ||
12 | fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o | 12 | fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o |
13 | 13 | ||
14 | xhci-hcd-y := xhci.o xhci-mem.o xhci-pci.o | 14 | xhci-hcd-y := xhci.o xhci-mem.o |
15 | xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o | 15 | xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o |
16 | xhci-hcd-$(CONFIG_PCI) += xhci-pci.o | ||
16 | 17 | ||
17 | obj-$(CONFIG_USB_WHCI_HCD) += whci/ | 18 | obj-$(CONFIG_USB_WHCI_HCD) += whci/ |
18 | 19 | ||
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index e2c82d1249c2..9f51f88cc0f5 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -320,12 +320,12 @@ static struct pci_driver xhci_pci_driver = { | |||
320 | #endif | 320 | #endif |
321 | }; | 321 | }; |
322 | 322 | ||
323 | int xhci_register_pci(void) | 323 | int __init xhci_register_pci(void) |
324 | { | 324 | { |
325 | return pci_register_driver(&xhci_pci_driver); | 325 | return pci_register_driver(&xhci_pci_driver); |
326 | } | 326 | } |
327 | 327 | ||
328 | void xhci_unregister_pci(void) | 328 | void __exit xhci_unregister_pci(void) |
329 | { | 329 | { |
330 | pci_unregister_driver(&xhci_pci_driver); | 330 | pci_unregister_driver(&xhci_pci_driver); |
331 | } | 331 | } |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2409bbe1b223..1ff95a0df576 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -4039,16 +4039,13 @@ MODULE_LICENSE("GPL"); | |||
4039 | 4039 | ||
4040 | static int __init xhci_hcd_init(void) | 4040 | static int __init xhci_hcd_init(void) |
4041 | { | 4041 | { |
4042 | #ifdef CONFIG_PCI | 4042 | int retval; |
4043 | int retval = 0; | ||
4044 | 4043 | ||
4045 | retval = xhci_register_pci(); | 4044 | retval = xhci_register_pci(); |
4046 | |||
4047 | if (retval < 0) { | 4045 | if (retval < 0) { |
4048 | printk(KERN_DEBUG "Problem registering PCI driver."); | 4046 | printk(KERN_DEBUG "Problem registering PCI driver."); |
4049 | return retval; | 4047 | return retval; |
4050 | } | 4048 | } |
4051 | #endif | ||
4052 | /* | 4049 | /* |
4053 | * Check the compiler generated sizes of structures that must be laid | 4050 | * Check the compiler generated sizes of structures that must be laid |
4054 | * out in specific ways for hardware access. | 4051 | * out in specific ways for hardware access. |
@@ -4073,8 +4070,6 @@ module_init(xhci_hcd_init); | |||
4073 | 4070 | ||
4074 | static void __exit xhci_hcd_cleanup(void) | 4071 | static void __exit xhci_hcd_cleanup(void) |
4075 | { | 4072 | { |
4076 | #ifdef CONFIG_PCI | ||
4077 | xhci_unregister_pci(); | 4073 | xhci_unregister_pci(); |
4078 | #endif | ||
4079 | } | 4074 | } |
4080 | module_exit(xhci_hcd_cleanup); | 4075 | module_exit(xhci_hcd_cleanup); |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index ad11c38afe85..3c8fbd2772ea 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1644,6 +1644,9 @@ void xhci_free_command(struct xhci_hcd *xhci, | |||
1644 | /* xHCI PCI glue */ | 1644 | /* xHCI PCI glue */ |
1645 | int xhci_register_pci(void); | 1645 | int xhci_register_pci(void); |
1646 | void xhci_unregister_pci(void); | 1646 | void xhci_unregister_pci(void); |
1647 | #else | ||
1648 | static inline int xhci_register_pci(void) { return 0; } | ||
1649 | static inline void xhci_unregister_pci(void) {} | ||
1647 | #endif | 1650 | #endif |
1648 | 1651 | ||
1649 | /* xHCI host controller glue */ | 1652 | /* xHCI host controller glue */ |