USB driver does not build in kernel
Hello,
I try to build a kernel that integrates the usb-uhci driver and I get an error at ld time (gcc 2.96 & gcc 3.0.1):
drivers/usb/usbdrv.o: In function `alloc_uhci':
drivers/usb/usbdrv.o(.text.init+0x802): relocation truncated to fit: PCREL21B uhci_pci_remove
I think this is due to uhci_pci_remove() being declared as:
_static void __devexit uhci_pci_remove (struct pci_dev *dev)
and being called by alloc_uhci().
I removed the __devexit attribute and all seems to be OK.
As __devexit should mean "only used at exit time", according to init.h.
A possible patch could be:
drivers/usb/usb-uhci.c +1 -1
@@ -2845,7 +2845,7 @@ s->running =1 ; } -_static void __devexit +_static voiduhci_pci_remove (struct pci_dev *dev) {uhci_t *s =pci_get_drvdata (dev);
Signature · 8 lines
Sincères salutations. _____________________________________________________________________ Xavier BRU BULL ISD/R&D/INTEL office: FREC B1-422 tel : +33 (0)4 76 29 77 45 http://www-frec.bull.fr fax : +33 (0)4 76 29 77 70 mailto:[email protected] addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE _____________________________________________________________________
Quoted 4 lines · Xavier Bru
Hello,
I try to build a kernel that integrates the usb-uhci driver and I get an error at ld time (gcc 2.96 & gcc 3.0.1):
A way around this is to enable CONFIG_HOTPLUG, which you probably want to do anyway if you are using USB. There is a better patch and description of why this is happening on linux-kernel right now.
thanks,
greg k-h