I noticed that if you modprobe uhci but have no such hardware (it was
an alpha, with ohci, and I was tired) the module fails to load,
obviously, but it leaves a proc file behind, /proc/driver/uhci.

The attached patch should fix that, it seemed simple enough. It's not
tested beyond the fact that it compiles, but I have a good feeling about
it.

The patch is against 2.4.20.

/August.
-- 
Wrong on most accounts.  const Foo *foo; and Foo const *foo; mean the same: foo
being a pointer to const Foo.  const Foo const *foo; would mean the same but is
illegal (double const).  You are confusing this with Foo * const foo; and const
Foo * const foo; respectively. -David Kastrup, comp.os.linux.development.system
--- drivers/usb/uhci.c  2002-11-29 00:53:15.000000000 +0100
+++ drivers/usb/uhci-mod.c      2003-01-20 22:55:44.000000000 +0100
@@ -3136,7 +3136,7 @@
 up_failed:
 
 #ifdef CONFIG_PROC_FS
-       remove_proc_entry("uhci", 0);
+       remove_proc_entry("driver/uhci", 0);
 
 proc_failed:
 #endif
@@ -3156,7 +3156,7 @@
                printk(KERN_INFO "uhci: not all urb_priv's were freed\n");
 
 #ifdef CONFIG_PROC_FS
-       remove_proc_entry("uhci", 0);
+       remove_proc_entry("driver/uhci", 0);
 #endif
 
        if (errbuf)

Reply via email to