ray_cs: use remove_proc_subtree to simplify procfs code
authorYueHaibing <yuehaibing@huawei.com>
Wed, 6 Mar 2019 11:48:12 +0000 (19:48 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 25 Apr 2019 16:38:52 +0000 (19:38 +0300)
Use remove_proc_subtree to remove the whole subtree

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ray_cs.c

index d561659..ee4d810 100644 (file)
@@ -2820,11 +2820,7 @@ static void __exit exit_ray_cs(void)
        pr_debug("ray_cs: cleanup_module\n");
 
 #ifdef CONFIG_PROC_FS
-       remove_proc_entry("driver/ray_cs/ray_cs", NULL);
-       remove_proc_entry("driver/ray_cs/essid", NULL);
-       remove_proc_entry("driver/ray_cs/net_type", NULL);
-       remove_proc_entry("driver/ray_cs/translate", NULL);
-       remove_proc_entry("driver/ray_cs", NULL);
+       remove_proc_subtree("driver/ray_cs", NULL);
 #endif
 
        pcmcia_unregister_driver(&ray_driver);