[PATCH 3/5] staging: wilc1000: remove the use of 'wilc_debugfs_info_t' struct

Ajay Singh ajay.kathat at microchip.com
Sun Aug 12 04:47:43 UTC 2018


Refactor the code to remove the use of 'wilc_debugfs_info_t' struct.
Pass NULL for data in debugfs_create_file() call, as its value is not
used.

Signed-off-by: Ajay Singh <ajay.kathat at microchip.com>
---
 drivers/staging/wilc1000/wilc_debugfs.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index 78c0831..c9bc325 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -62,25 +62,10 @@ ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf,
 	return count;
 }
 
-struct wilc_debugfs_info_t {
-	const char *name;
-	int perm;
-	unsigned int data;
-};
-
-static struct wilc_debugfs_info_t debugfs_info = {
-	"wilc_debug_level",
-	0666,
-	(DEBUG | ERR),
-};
-
 int wilc_debugfs_init(const struct file_operations *fops)
 {
-	struct wilc_debugfs_info_t *info = &debugfs_info;
-
 	wilc_dir = debugfs_create_dir("wilc_wifi", NULL);
-	debugfs_create_file(info->name, info->perm, wilc_dir, &info->data,
-			    fops);
+	debugfs_create_file("wilc_debug_level", 0666, wilc_dir, NULL, fops);
 
 	return 0;
 }
-- 
2.7.4



More information about the devel mailing list