Skip to contentSkip to conversation

Build failure with !CONFIG_PCI and with CONFIG_ISAPNP=y && CONFIG_PNPBIOS=y

PATCH New Mika Kukkonen 1 participant 1 message Feb 14, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Build failure with !CONFIG_PCI and with CONFIG_ISAPNP=y && CONFIG_PNPBIOS=y

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