Tweak /proc/ipmi removal
authorAlexey Dobriyan <adobriyan@sw.ru>
Wed, 17 Oct 2007 06:26:50 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:51 +0000 (08:42 -0700)
Driver does
proc_mkdir("ipmi", NULL);
but
remove_proc_entry(proc_ipmi_root->name, &proc_root);

This is OK and working if only slightly inconsistent.  Also changing
proc_root to NULL will help OpenVZ which has multiple proc roots and, as we
now know, requires matching parents in such cases.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ipmi/ipmi_msghandler.c

index 6a01dd9e43f865726928553fe51671db7adbb6dc..8435fba73dafdcd8e847403e25dee71d2feee90c 100644 (file)
@@ -4136,7 +4136,7 @@ static __exit void cleanup_ipmi(void)
        del_timer_sync(&ipmi_timer);
 
 #ifdef CONFIG_PROC_FS
-       remove_proc_entry(proc_ipmi_root->name, &proc_root);
+       remove_proc_entry(proc_ipmi_root->name, NULL);
 #endif /* CONFIG_PROC_FS */
 
        driver_unregister(&ipmidriver);