PNP: introduce pnp_irq_mask_t typedef

This adds a typedef for the IRQ bitmap, which should cause
no functional change, but will make it easier to pass a
pointer to a bitmap to pnp_register_irq_resource().

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Bjorn Helgaas
2008-06-27 16:57:05 -06:00
committed by Andi Kleen
parent a1802c4295
commit 7aefff5185
8 changed files with 22 additions and 17 deletions

View File

@@ -66,15 +66,18 @@ static void quirk_cmi8330_resources(struct pnp_dev *dev)
struct pnp_irq *irq;
struct pnp_dma *dma;
for (irq = res->irq; irq; irq = irq->next) { // Valid irqs are 5, 7, 10
for (irq = res->irq; irq; irq = irq->next) {
/* Valid irqs are 5, 7, 10 */
tmp = 0x04A0;
bitmap_copy(irq->map, &tmp, 16); // 0000 0100 1010 0000
bitmap_copy(irq->map.bits, &tmp, 16);
}
for (dma = res->dma; dma; dma = dma->next) // Valid 8bit dma channels are 1,3
for (dma = res->dma; dma; dma = dma->next) {
/* Valid 8bit dma channels are 1,3 */
if ((dma->flags & IORESOURCE_DMA_TYPE_MASK) ==
IORESOURCE_DMA_8BIT)
dma->map = 0x000A;
}
}
dev_info(&dev->dev, "CMI8330 quirk - forced possible IRQs to 5, 7, 10 "
"and DMA channels to 1, 3\n");
@@ -187,7 +190,7 @@ static void quirk_ad1815_mpu_resources(struct pnp_dev *dev)
if (!copy)
break;
memcpy(copy->map, irq->map, sizeof copy->map);
bitmap_copy(copy->map.bits, irq->map.bits, PNP_IRQ_NR);
copy->flags = irq->flags;
copy->next = res->irq; /* Yes, this is NULL */