summaryrefslogtreecommitdiff
path: root/drivers/usb/host/isp116x-hcd.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-16 17:46:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-10 11:37:15 +0300
commit7c7b971d71e754cdb46d7268749fa2f7064d6df3 (patch)
treefaa3e93a3041bce52aceb124319c2adde419ab89 /drivers/usb/host/isp116x-hcd.c
parentb9d9137d29b27f4ad023af2b1259fc9a154f7577 (diff)
downloadlinux-7c7b971d71e754cdb46d7268749fa2f7064d6df3.tar.xz
USB: host: isp116x: remove dentry pointer for debugfs
There is no need to keep the dentry pointer around for the created debugfs file, as it is only needed when removing it from the system. When it is to be removed, ask debugfs itself for the pointer, to save on storage and make things a bit simpler. Cc: Olav Kongas <ok@artecdesign.ee> Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20210216144645.3813043-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/isp116x-hcd.c')
-rw-r--r--drivers/usb/host/isp116x-hcd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 8544a2a2c1e6..8835f6bd528e 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1200,14 +1200,13 @@ DEFINE_SHOW_ATTRIBUTE(isp116x_debug);
static void create_debug_file(struct isp116x *isp116x)
{
- isp116x->dentry = debugfs_create_file(hcd_name,
- S_IRUGO, NULL, isp116x,
- &isp116x_debug_fops);
+ debugfs_create_file(hcd_name, S_IRUGO, usb_debug_root, isp116x,
+ &isp116x_debug_fops);
}
static void remove_debug_file(struct isp116x *isp116x)
{
- debugfs_remove(isp116x->dentry);
+ debugfs_remove(debugfs_lookup(hcd_name, usb_debug_root));
}
#else