[Linux-ia64] USB driver does not build in kernel

Xavier Bru
2001-12-05T13:51:36Z

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:

--- linux-2.4.16-ori/drivers/usb/usb-uhci.c Fri Nov 9 22:41:42 2001
+++ linux-2.4.16/drivers/usb/usb-uhci.c Wed Dec 5 14:49:40 2001
@@ -2845,7 +2845,7 @@
s->running = 1;
}

-_static void __devexit
+_static void
uhci_pci_remove (struct pci_dev *dev)
{
uhci_t *s = pci_get_drvdata(dev);

--

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:Xavier.Bru@bull.net
addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE
_____________________________________________________________________