summaryrefslogtreecommitdiff
path: root/net/hsr/hsr_debugfs.c
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2019-04-15 11:36:02 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-15 17:22:02 -0700
commit3271273388fb14a4e8c582a8c7eaf5ef958291b1 (patch)
treee517412dea62aa91e86b3e29ae626efd06b27e3a /net/hsr/hsr_debugfs.c
parent9c5f8a19b2de2860d4b7764204c52832ac0f4440 (diff)
net: hsr: fix debugfs path to support multiple interfaces
Fix the path of hsr debugfs root directory to use the net device name so that it can work with multiple interfaces. While at it, also fix some typos. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_debugfs.c')
-rw-r--r--net/hsr/hsr_debugfs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/hsr/hsr_debugfs.c b/net/hsr/hsr_debugfs.c
index b5a955013976..94447974a3c0 100644
--- a/net/hsr/hsr_debugfs.c
+++ b/net/hsr/hsr_debugfs.c
@@ -1,9 +1,9 @@
/*
* hsr_debugfs code
- * Copyright (C) 2017 Texas Instruments Incorporated
+ * Copyright (C) 2019 Texas Instruments Incorporated
*
* Author(s):
- * Murali Karicheri <m-karicheri2@ti.com?
+ * Murali Karicheri <m-karicheri2@ti.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -78,12 +78,12 @@ static const struct file_operations hsr_fops = {
* When debugfs is configured this routine sets up the node_table file per
* hsr device for dumping the node_table entries
*/
-int hsr_debugfs_init(struct hsr_priv *priv)
+int hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev)
{
int rc = -1;
struct dentry *de = NULL;
- de = debugfs_create_dir("hsr", NULL);
+ de = debugfs_create_dir(hsr_dev->name, NULL);
if (!de) {
pr_err("Cannot create hsr debugfs root\n");
return rc;
@@ -99,9 +99,8 @@ int hsr_debugfs_init(struct hsr_priv *priv)
return rc;
}
priv->node_tbl_file = de;
- rc = 0;
- return rc;
+ return 0;
}
/* hsr_debugfs_term - Tear down debugfs intrastructure