aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2011-09-23 17:20:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-26 18:51:14 -0400
commit0cc47d547d7a482434926331265b3713381b1e60 (patch)
tree77530e02def9808bf064bdbe48e9fc339f4b832e /drivers/usb
parent552e0c4f12fef0ad1caf21d2b57ac3a2735edef3 (diff)
usb/xhci: remove CONFIG_PCI in xhci.c's probe function
This removes the need of ifdefs within the init function and with it the headache about the correct clean without bus X but with bus/platform Y & Z. xhci-pci is only compiled if CONFIG_PCI is selected which can be de-selected now without trouble. For now the result is kinda useless because we have no other glue code. However, since nobody is using USB_ARCH_HAS_XHCI then it should not be an issue :) Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/Makefile3
-rw-r--r--drivers/usb/host/xhci-pci.c4
-rw-r--r--drivers/usb/host/xhci.c7
-rw-r--r--drivers/usb/host/xhci.h3
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
12fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o 12fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o
13 13
14xhci-hcd-y := xhci.o xhci-mem.o xhci-pci.o 14xhci-hcd-y := xhci.o xhci-mem.o
15xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o 15xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o
16xhci-hcd-$(CONFIG_PCI) += xhci-pci.o
16 17
17obj-$(CONFIG_USB_WHCI_HCD) += whci/ 18obj-$(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
323int xhci_register_pci(void) 323int __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
328void xhci_unregister_pci(void) 328void __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
4040static int __init xhci_hcd_init(void) 4040static 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
4074static void __exit xhci_hcd_cleanup(void) 4071static void __exit xhci_hcd_cleanup(void)
4075{ 4072{
4076#ifdef CONFIG_PCI
4077 xhci_unregister_pci(); 4073 xhci_unregister_pci();
4078#endif
4079} 4074}
4080module_exit(xhci_hcd_cleanup); 4075module_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 */
1645int xhci_register_pci(void); 1645int xhci_register_pci(void);
1646void xhci_unregister_pci(void); 1646void xhci_unregister_pci(void);
1647#else
1648static inline int xhci_register_pci(void) { return 0; }
1649static inline void xhci_unregister_pci(void) {}
1647#endif 1650#endif
1648 1651
1649/* xHCI host controller glue */ 1652/* xHCI host controller glue */