- pre5:
[davej-history.git] / drivers / usb / usb-core.c
blob7f124b897dace9e41b540db88bb8d5cf355cb0ea
1 /*
2 * driver/usb/usb-core.c
4 * (C) Copyright David Waite 1999
5 * based on code from usb.c, by Linus Torvalds
7 * The purpose of this file is to pull any and all generic modular code from
8 * usb.c and put it in a separate file. This way usb.c is kept as a generic
9 * library, while this file handles starting drivers, etc.
13 #include <linux/version.h>
14 #include <linux/kernel.h>
15 #include <linux/config.h>
16 #include <linux/init.h>
17 #include <linux/usb.h>
20 * USB core
23 int usb_hub_init(void);
24 void usb_hub_cleanup(void);
25 int usb_major_init(void);
26 void usb_major_cleanup(void);
30 * HCI drivers
33 int uhci_init(void);
34 int ohci_hcd_init(void);
37 * Cleanup
40 static void __exit usb_exit(void)
42 usb_major_cleanup();
43 usbdevfs_cleanup();
44 usb_hub_cleanup();
48 * Init
51 static int __init usb_init(void)
53 usb_major_init();
54 usbdevfs_init();
55 usb_hub_init();
57 #ifndef CONFIG_USB_MODULE
58 #ifdef CONFIG_USB_UHCI
59 uhci_init();
60 #endif
61 #ifdef CONFIG_USB_UHCI_ALT
62 uhci_init();
63 #endif
64 #ifdef CONFIG_USB_OHCI
65 ohci_hcd_init();
66 #endif
67 #endif
68 return 0;
71 module_init(usb_init);
72 module_exit(usb_exit);