I got the following error at the final linking:
<-- snip -->
...
--end-group \
-o vmlinux
...
drivers/usb/usbdrv.o(.text+0x65061): In function `auerchar_open':
: undefined reference to `auerdev_table_mutex'
drivers/usb/usbdrv.o(.text+0x6506a): In function `auerchar_open':
: undefined reference to `auerdev_table_mutex'
drivers/usb/usbdrv.o(.text+0x65087): In function `auerchar_open':
: undefined reference to `auerdev_table'
drivers/usb/usbdrv.o(.text+0x65094): In function `auerchar_open':
: undefined reference to `auerdev_table_mutex'
drivers/usb/usbdrv.o(.text+0x650c1): In function `auerchar_open':
: undefined reference to `auerdev_table_mutex'
drivers/usb/usbdrv.o(.text+0x650da): In function `auerchar_open':
: undefined reference to `auerdev_table_mutex'
make: *** [vmlinux] Error 1
<-- snip -->
auerdev_table and auerdev_table_mutex are static in auermain.c but used
from auerchar.c. The following patch makes them non-static:
--- linux-2.4.21-pre5-full/drivers/usb/auermain.c.old 2003-02-28 00:15:45.000000000 +0100
+++ linux-2.4.21-pre5-full/drivers/usb/auermain.c 2003-02-28 00:20:49.000000000 +0100
@@ -66,10 +66,10 @@
extern devfs_handle_t usb_devfs_handle;
/* array of pointers to our devices that are currently connected */
-static struct auerswald *auerdev_table[AUER_MAX_DEVICES];
+struct auerswald *auerdev_table[AUER_MAX_DEVICES];
/* lock to protect the auerdev_table structure */
-static struct semaphore auerdev_table_mutex;
+struct semaphore auerdev_table_mutex;
/*-------------------------------------------------------------------*/
/* Forwards */
cu
Adrian
--"Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/