aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-16 15:46:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-10 09:37:16 +0100
commit153e140d1eeeabb0a504835a15a2b4d29c5c9d6c (patch)
tree606b04a790eafe598bd168896c05f5c376e88578
parentUSB: typec: fusb302: create debugfs subdir for the driver (diff)
downloadwireguard-linux-153e140d1eeeabb0a504835a15a2b4d29c5c9d6c.tar.xz
wireguard-linux-153e140d1eeeabb0a504835a15a2b4d29c5c9d6c.zip
USB: typec: tcpm: create debugfs subdir for the driver
The single debugfs file for this driver really is a log file, so make a subdir and call it "log" to make it obvious this is what it is for. This makes cleanup simpler as we just remove the whole directory, no need to handle individual files anymore. Cc: Guenter Roeck <linux@roeck-us.net> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: linux-usb@vger.kernel.org Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210216144645.3813043-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/typec/tcpm/tcpm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 8469c37a59e1..16bda6cea7b8 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -709,8 +709,9 @@ static void tcpm_debugfs_init(struct tcpm_port *port)
mutex_init(&port->logbuffer_lock);
snprintf(name, NAME_MAX, "tcpm-%s", dev_name(port->dev));
- port->dentry = debugfs_create_file(name, S_IFREG | 0444, usb_debug_root,
- port, &tcpm_debug_fops);
+ port->dentry = debugfs_create_dir(name, usb_debug_root);
+ debugfs_create_file("log", S_IFREG | 0444, port->dentry, port,
+ &tcpm_debug_fops);
}
static void tcpm_debugfs_exit(struct tcpm_port *port)