[PATCH] USB: add notifier functions to the USB core for devices and busses
This should let us get rid of all of the different hooks in the USB core for
when something has changed.
Also, some other parts of the kernel have wanted to know this kind of
information at times.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 9ad3912..b700b6c 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -792,6 +792,7 @@
list_add (&bus->bus_list, &usb_bus_list);
up (&usb_bus_list_lock);
+ usb_notify_add_bus(bus);
usbfs_add_bus (bus);
usbmon_notify_bus_add (bus);
@@ -820,6 +821,7 @@
list_del (&bus->bus_list);
up (&usb_bus_list_lock);
+ usb_notify_remove_bus(bus);
usbmon_notify_bus_remove (bus);
usbfs_remove_bus (bus);