linux 2.1.93 xd driver does not compile

Adam J. Richter (adam@yggdrasil.com)
Wed, 8 Apr 1998 15:25:10 -0700


The xd driver in the Linux 2.1.93 kernel does not compile.
I have attached the patch below. This patch is a little ugly. If
I knew what the purpose of "if (xd[3]<=0)" is and why the xd[] array
only seem to be declared if the driver is a module, I might be able to
make a prettier patch.

(This is another bug caught by the GNU style "./configure" script.)

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
----------------------CUT HERE---------------------------------------------
--- /tmp/linux-2.1.93/drivers/block/xd.c Sat Apr 4 09:36:10 1998
+++ linux/drivers/block/xd.c Tue Apr 7 19:54:40 1998
@@ -701,12 +701,20 @@
xd_info[drive].sectors = (u_char)(xd_geo[3 * drive + 2]);
}

+#ifdef MODULE
+static int xd[];
+#endif /* MODULE */
+
__initfunc(static void xd_dtc_init_controller (unsigned int address))
{
switch (address) {
case 0x00000:
case 0xC8000: break; /*initial: 0x320 */
- case 0xCA000: if (xd[3]<=0) xd_iobase = 0x324;
+ case 0xCA000:
+#ifdef MODULE
+ if (xd[3]<=0)
+#endif
+ xd_iobase = 0x324;
break;
case 0xD0000: /*5150CX*/
case 0xD8000: break; /*5150CX & 5150XL*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu