gru: fix bug in module unload
Jack Steiner [Wed, 16 Dec 2009 00:48:06 +0000 (16:48 -0800)]
Fix bug in module unload.  Previous code was not correctly deleting the
files in /proc.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

drivers/misc/sgi-gru/gruprocfs.c

index a8a2e76..4f6fc11 100644 (file)
@@ -351,7 +351,7 @@ static void delete_proc_files(void)
                for (p = proc_files; p->name; p++)
                        if (p->entry)
                                remove_proc_entry(p->name, proc_gru);
-               remove_proc_entry("gru", NULL);
+               remove_proc_entry("gru", proc_gru->parent);
        }
 }