USB: core: no need to save usb_devices_root
There is no need to save the usb_devices debugfs file as we only need it when removing it, so have the debugfs code look it up when it is needed instead, saving the storage. Link: https://lore.kernel.org/r/YCubCA/trHAF7PtF@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>pull/634/merge
parent
70be046404
commit
9c174b57c9
|
|
@ -950,17 +950,15 @@ static struct notifier_block usb_bus_nb = {
|
||||||
.notifier_call = usb_bus_notify,
|
.notifier_call = usb_bus_notify,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct dentry *usb_devices_root;
|
|
||||||
|
|
||||||
static void usb_debugfs_init(void)
|
static void usb_debugfs_init(void)
|
||||||
{
|
{
|
||||||
usb_devices_root = debugfs_create_file("devices", 0444, usb_debug_root,
|
debugfs_create_file("devices", 0444, usb_debug_root, NULL,
|
||||||
NULL, &usbfs_devices_fops);
|
&usbfs_devices_fops);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usb_debugfs_cleanup(void)
|
static void usb_debugfs_cleanup(void)
|
||||||
{
|
{
|
||||||
debugfs_remove(usb_devices_root);
|
debugfs_remove(debugfs_lookup("devices", usb_debug_root));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue