summaryrefslogtreecommitdiff
path: root/drivers/usb/core/inode.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2009-01-13 11:33:42 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-02 09:53:21 -0800
commit8bc07b4005a66aaf899a95b701e131ac9a08078a (patch)
treeaed80d1a4fa0ab01b54537183fb0cf4dc46c4e8a /drivers/usb/core/inode.c
parent843f222cd9fc4360c6b1b1e9946737f70857f63e (diff)
USB: fix char-device disconnect handling
commit 501950d846218ed80a776d2aae5aed9c8b92e778 upstream. This patch (as1198) fixes a conceptual bug: Somewhere along the line we managed to confuse USB class devices with USB char devices. As a result, the code to send a disconnect signal to userspace would not be built if both CONFIG_USB_DEVICE_CLASS and CONFIG_USB_DEVICEFS were disabled. The usb_fs_classdev_common_remove() routine has been renamed to usbdev_remove() and it is now called whenever any USB device is removed, not just when a class device is unregistered. The notifier registration and unregistration calls are no longer conditionally compiled. And since the common removal code will always be called as part of the char device interface, there's no need to call it again as part of the usbfs interface; thus the invocation of usb_fs_classdev_common_remove() has been taken out of usbfs_remove_device(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Alon Bar-Lev <alon.barlev@gmail.com> Tested-by: Alon Bar-Lev <alon.barlev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/inode.c')
-rw-r--r--drivers/usb/core/inode.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index 94632264dccf..3181d7d75e33 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -718,7 +718,6 @@ static void usbfs_remove_device(struct usb_device *dev)
fs_remove_file (dev->usbfs_dentry);
dev->usbfs_dentry = NULL;
}
- usb_fs_classdev_common_remove(dev);
}
static int usbfs_notify(struct notifier_block *self, unsigned long action, void *dev)