Commit cdc265a4 authored by Patrick Mochel's avatar Patrick Mochel

USB: define usb_bus_type and register on startup

parent 22775da0
......@@ -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();
......
......@@ -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, ...)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment