2002-10-19 09:15:16

by Stelian Pop

[permalink] [raw]
Subject: [PATCH 2.5.44] pnp compilation fix.

Hi,

crusoe:~/kernel/linux-2.5 2 > grep PNP .config
CONFIG_PNP=y
CONFIG_PNP_NAMES=y
# CONFIG_PNP_DEBUG is not set
# CONFIG_ISAPNP is not set
# CONFIG_PNPBIOS is not set
# CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_IP_PNP is not set

When using this config (maybe a little bit unusual to have PNP
defined but non ISAPNP, but anyway), the code in drivers/pnp/compat.c
tries to access the global isapnp variables, which are ifdef'ed out.

The attached patch fix the compilation, but maybe excluding the whole
compat.c file from compilation when ISAPNP is not defined (maybe by
moving it to isapnp/) would be a more proper fix.


===== drivers/pnp/compat.c 1.1 vs edited =====
--- 1.1/drivers/pnp/compat.c Sat Oct 19 01:50:26 2002
+++ edited/drivers/pnp/compat.c Sat Oct 19 10:09:16 2002
@@ -31,6 +31,7 @@
unsigned short device,
struct pnp_card *from)
{
+#if CONFIG_ISAPNP
char id[7];
char any[7];
struct list_head *list;
@@ -46,6 +47,7 @@
return card;
list = list->next;
}
+#endif
return NULL;
}


Stelian.
--
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com