[PATCH] Build failure with !CONFIG_PCI and with CONFIG_ISAPNP=y && CONFIG_PNPBIOS=y

From: Mika Kukkonen
Date: Mon Feb 14 2005 - 08:29:20 EST


Trying to build latest kernel with !CONFIG_PCI and with
CONFIG_ISAPNP=y && CONFIG_PNPBIOS=y
I got the following build error:

LD vmlinux
drivers/built-in.o(.text+0x5486): In function
'pnpbios_parse_allocated_irqresource':
: undefined reference to 'pcibios_penalize_isa_irq'

Clearly pcibios_penalize_isa_irq() is meant to be called only with
CONFIG_PCI, so
following patch suggests itself:

--- linux-2.5/drivers/pnp/pnpbios/rsparser.c 2005-02-14 12:08:49.000000000 +0200
+++ linux-tiny/drivers/pnp/pnpbios/rsparser.c 2005-02-14
12:12:32.000000000 +0200
@@ -7,7 +7,12 @@
#include <linux/ctype.h>
#include <linux/pnp.h>
#include <linux/pnpbios.h>
+
+#ifdef CONFIG_PCI
#include <linux/pci.h>
+#else
+inline void pcibios_penalize_isa_irq(int irq) {}
+#endif /* CONFIG_PCI */

#include "pnpbios.h"

By the way, while using cscope I noticed that there is very bogus looking
definition of pcibios_penalize_isa_irq() in line 24 of arch/i386/pci/visws.c,
but as that is not called anywhere in that file it could be simply removed.
No patch for that though because I could not get the file to compile.

--MiKu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/