diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-06-27 18:57:05 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:06 -0400 |
commit | 7aefff51854ccd33599c40b4e360d94cb2b7622f (patch) | |
tree | 10cc269be1f9b581028dd6540a6e15a1b9d02e9a /drivers/pnp/quirks.c | |
parent | a1802c42950403657d07e64558eff612d550ce16 (diff) |
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>
Diffstat (limited to 'drivers/pnp/quirks.c')
-rw-r--r-- | drivers/pnp/quirks.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 21acb54eff6d..48e60171b3ba 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -66,15 +66,18 @@ static void quirk_cmi8330_resources(struct pnp_dev *dev) | |||
66 | struct pnp_irq *irq; | 66 | struct pnp_irq *irq; |
67 | struct pnp_dma *dma; | 67 | struct pnp_dma *dma; |
68 | 68 | ||
69 | for (irq = res->irq; irq; irq = irq->next) { // Valid irqs are 5, 7, 10 | 69 | for (irq = res->irq; irq; irq = irq->next) { |
70 | /* Valid irqs are 5, 7, 10 */ | ||
70 | tmp = 0x04A0; | 71 | tmp = 0x04A0; |
71 | bitmap_copy(irq->map, &tmp, 16); // 0000 0100 1010 0000 | 72 | bitmap_copy(irq->map.bits, &tmp, 16); |
72 | } | 73 | } |
73 | 74 | ||
74 | for (dma = res->dma; dma; dma = dma->next) // Valid 8bit dma channels are 1,3 | 75 | for (dma = res->dma; dma; dma = dma->next) { |
76 | /* Valid 8bit dma channels are 1,3 */ | ||
75 | if ((dma->flags & IORESOURCE_DMA_TYPE_MASK) == | 77 | if ((dma->flags & IORESOURCE_DMA_TYPE_MASK) == |
76 | IORESOURCE_DMA_8BIT) | 78 | IORESOURCE_DMA_8BIT) |
77 | dma->map = 0x000A; | 79 | dma->map = 0x000A; |
80 | } | ||
78 | } | 81 | } |
79 | dev_info(&dev->dev, "CMI8330 quirk - forced possible IRQs to 5, 7, 10 " | 82 | dev_info(&dev->dev, "CMI8330 quirk - forced possible IRQs to 5, 7, 10 " |
80 | "and DMA channels to 1, 3\n"); | 83 | "and DMA channels to 1, 3\n"); |
@@ -187,7 +190,7 @@ static void quirk_ad1815_mpu_resources(struct pnp_dev *dev) | |||
187 | if (!copy) | 190 | if (!copy) |
188 | break; | 191 | break; |
189 | 192 | ||
190 | memcpy(copy->map, irq->map, sizeof copy->map); | 193 | bitmap_copy(copy->map.bits, irq->map.bits, PNP_IRQ_NR); |
191 | copy->flags = irq->flags; | 194 | copy->flags = irq->flags; |
192 | 195 | ||
193 | copy->next = res->irq; /* Yes, this is NULL */ | 196 | copy->next = res->irq; /* Yes, this is NULL */ |