summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2005-06-21 06:15:16 +0200
committerGreg Kroah-Hartman2005-10-29 01:47:46 +0200
commit3099e75a7ccc3c5b0a4cf988a76d9c4a7fa5e91a (patch)
tree8b1e7e5ddf097b347717e64aefb14ab33c9b2f90 /drivers/usb/core/hub.c
parent[PATCH] USB: remove the global function usbdev_lookup_minor (diff)
downloadkernel-qcow2-linux-3099e75a7ccc3c5b0a4cf988a76d9c4a7fa5e91a.tar.gz
kernel-qcow2-linux-3099e75a7ccc3c5b0a4cf988a76d9c4a7fa5e91a.tar.xz
kernel-qcow2-linux-3099e75a7ccc3c5b0a4cf988a76d9c4a7fa5e91a.zip
[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>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 273e6ccca213..4f1a8c8cf92b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1128,6 +1128,8 @@ void usb_disconnect(struct usb_device **pdev)
*/
usb_disable_device(udev, 0);
+ usb_notify_remove_device(udev);
+
/* Free the device number, remove the /proc/bus/usb entry and
* the sysfs attributes, and delete the parent's children[]
* (or root_hub) pointer.
@@ -1371,6 +1373,7 @@ int usb_new_device(struct usb_device *udev)
}
/* USB device state == configured ... usable */
+ usb_notify_add_device(udev);
/* add a /proc/bus/usb entry */
usbdev_add(udev);