Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -5
+3 -4
drivers/usb/host/isp116x-hcd.c
··· 1200 1200 1201 1201 static void create_debug_file(struct isp116x *isp116x) 1202 1202 { 1203 - isp116x->dentry = debugfs_create_file(hcd_name, 1204 - S_IRUGO, NULL, isp116x, 1205 - &isp116x_debug_fops); 1203 + debugfs_create_file(hcd_name, S_IRUGO, usb_debug_root, isp116x, 1204 + &isp116x_debug_fops); 1206 1205 } 1207 1206 1208 1207 static void remove_debug_file(struct isp116x *isp116x) 1209 1208 { 1210 - debugfs_remove(isp116x->dentry); 1209 + debugfs_remove(debugfs_lookup(hcd_name, usb_debug_root)); 1211 1210 } 1212 1211 1213 1212 #else
-1
drivers/usb/host/isp116x.h
··· 260 260 261 261 struct isp116x_platform_data *board; 262 262 263 - struct dentry *dentry; 264 263 unsigned long stat1, stat2, stat4, stat8, stat16; 265 264 266 265 /* HC registers */