#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"
/* standard resource tags */
}
res->irq_resource[i].start =
res->irq_resource[i].end = (unsigned long) irq;
+ pcibios_penalize_isa_irq(irq);
}
}
pnpbios_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma)
{
int i = 0;
- while (!(res->dma_resource[i].flags & IORESOURCE_UNSET) && i < PNP_MAX_DMA) i++;
+ while (i < PNP_MAX_DMA &&
+ !(res->dma_resource[i].flags & IORESOURCE_UNSET))
+ i++;
if (i < PNP_MAX_DMA) {
res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag
if (dma == -1) {
pnpbios_parse_irq_option(unsigned char *p, int size, struct pnp_option *option)
{
struct pnp_irq * irq;
+ unsigned long bits;
+
irq = pnpbios_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL);
if (!irq)
return;
- irq->map = (p[2] << 8) | p[1];
+ bits = (p[2] << 8) | p[1];
+ bitmap_copy(irq->map, &bits, 16);
if (size > 2)
irq->flags = p[3];
else