|
@@ -1005,16 +1005,29 @@ static struct notifier_block usb_bus_nb = {
|
|
struct dentry *usb_debug_root;
|
|
struct dentry *usb_debug_root;
|
|
EXPORT_SYMBOL_GPL(usb_debug_root);
|
|
EXPORT_SYMBOL_GPL(usb_debug_root);
|
|
|
|
|
|
|
|
+struct dentry *usb_debug_devices;
|
|
|
|
+
|
|
static int usb_debugfs_init(void)
|
|
static int usb_debugfs_init(void)
|
|
{
|
|
{
|
|
usb_debug_root = debugfs_create_dir("usb", NULL);
|
|
usb_debug_root = debugfs_create_dir("usb", NULL);
|
|
if (!usb_debug_root)
|
|
if (!usb_debug_root)
|
|
return -ENOENT;
|
|
return -ENOENT;
|
|
|
|
+
|
|
|
|
+ usb_debug_devices = debugfs_create_file("devices", 0444,
|
|
|
|
+ usb_debug_root, NULL,
|
|
|
|
+ &usbfs_devices_fops);
|
|
|
|
+ if (!usb_debug_devices) {
|
|
|
|
+ debugfs_remove(usb_debug_root);
|
|
|
|
+ usb_debug_root = NULL;
|
|
|
|
+ return -ENOENT;
|
|
|
|
+ }
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static void usb_debugfs_cleanup(void)
|
|
static void usb_debugfs_cleanup(void)
|
|
{
|
|
{
|
|
|
|
+ debugfs_remove(usb_debug_devices);
|
|
debugfs_remove(usb_debug_root);
|
|
debugfs_remove(usb_debug_root);
|
|
}
|
|
}
|
|
|
|
|