[ACPI] PNPACPI vs sound IRQ
[linux-3.10.git] / drivers / pnp / pnpbios / rsparser.c
index 618ac15a9e90b2f1b98e76eb15225f989cf138bc..9001b6f0204ddb75d681c3c898e3962b7bab408c 100644 (file)
@@ -64,7 +64,7 @@ pnpbios_parse_allocated_irqresource(struct pnp_resource_table * res, int irq)
                }
                res->irq_resource[i].start =
                res->irq_resource[i].end = (unsigned long) irq;
-               pcibios_penalize_isa_irq(irq);
+               pcibios_penalize_isa_irq(irq, 1);
        }
 }
 
@@ -72,7 +72,9 @@ static void
 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) {