diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-25 19:25:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-27 09:35:16 +0200 |
commit | 0f60203d2142e759ac3913bb63017645ddf49f94 (patch) | |
tree | 8c2701329efccfb7efe21f601a912dc0ea378f3d /drivers/usb/host/fotg210-hcd.c | |
parent | USB: gadget: pxa27x_udc: remove dentry storage for debugfs file (diff) | |
download | wireguard-linux-0f60203d2142e759ac3913bb63017645ddf49f94.tar.xz wireguard-linux-0f60203d2142e759ac3913bb63017645ddf49f94.zip |
USB: fotg210-hcd: remove dentry storage for debugfs file
There is no need to store the dentry pointer for a debugfs file that we
only use to remove it when the device goes away. debugfs can do the
lookup for us instead, saving us some trouble, and making things smaller
overall.
Link: https://lore.kernel.org/r/20210525172534.848775-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/fotg210-hcd.c')
-rw-r--r-- | drivers/usb/host/fotg210-hcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 9c2eda0918e1..05fb8d97cf02 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -850,7 +850,6 @@ static inline void create_debug_files(struct fotg210_hcd *fotg210) struct dentry *root; root = debugfs_create_dir(bus->bus_name, fotg210_debug_root); - fotg210->debug_dir = root; debugfs_create_file("async", S_IRUGO, root, bus, &debug_async_fops); debugfs_create_file("periodic", S_IRUGO, root, bus, @@ -861,7 +860,9 @@ static inline void create_debug_files(struct fotg210_hcd *fotg210) static inline void remove_debug_files(struct fotg210_hcd *fotg210) { - debugfs_remove_recursive(fotg210->debug_dir); + struct usb_bus *bus = &fotg210_to_hcd(fotg210)->self; + + debugfs_remove(debugfs_lookup(bus->bus_name, fotg210_debug_root)); } /* handshake - spin reading hc until handshake completes or fails |