diff options
| author | Patrick Mochel <mochel@osdl.org> | 2002-05-29 19:44:20 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-05-29 19:44:20 -0700 |
| commit | cdc265a4b536040ec75295699112ff00814e472c (patch) | |
| tree | e5d2255535660596dec5ac2ff963f9eb1f09cbda | |
| parent | 22775da009ff878e020593ad247d7615e16f6ce8 (diff) | |
USB: define usb_bus_type and register on startup
| -rw-r--r-- | drivers/usb/core/usb.c | 5 | ||||
| -rw-r--r-- | include/linux/usb.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 4fcd2a04a673..46d59a89ecb4 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -2757,12 +2757,16 @@ struct list_head *usb_bus_get_list(void) } #endif +struct bus_type usb_bus_type = { + name: "usb", +}; /* * Init */ static int __init usb_init(void) { + bus_register(&usb_bus_type); usb_major_init(); usbfs_init(); usb_hub_init(); @@ -2775,6 +2779,7 @@ static int __init usb_init(void) */ static void __exit usb_exit(void) { + put_bus(&usb_bus_type); usb_major_cleanup(); usbfs_cleanup(); usb_hub_cleanup(); diff --git a/include/linux/usb.h b/include/linux/usb.h index df2c764dec66..d31eb7e942b3 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -713,6 +713,8 @@ struct usb_driver { /* void (*resume)(struct usb_device *dev); */ }; +extern struct bus_type usb_bus_type; + /* * use these in module_init()/module_exit() * and don't forget MODULE_DEVICE_TABLE(usb, ...) |
