summaryrefslogtreecommitdiffstats
path: root/drivers/parisc/dino.c
diff options
context:
space:
mode:
authorHelge Deller <deller@parisc-linux.org>2006-01-10 20:47:54 -0500
committerKyle McMartin <kyle@duet.int.mcmartin.ca>2006-01-10 21:51:39 -0500
commit4d64c9f58e618b1bdbc91cb071e6c8d90f43d620 (patch)
treecdfd90e3328934260227207cdcb2904218524a6c /drivers/parisc/dino.c
parenta01c8cb126cb5f5a592f01b08ff8859508c75ba1 (diff)
[PARISC] Introduce DINO_LOCAL_IRQS and use it for gsc_find_local_irq
Fix dino by using DINO_LOCAL_IRQS as the limit for gsc_find_local_irq() instead of the irq itself. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers/parisc/dino.c')
-rw-r--r--drivers/parisc/dino.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 595d1987e99..45a1a494c1c 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -124,6 +124,7 @@
#define DINO_IRQS 11 /* bits 0-10 are architected */
#define DINO_IRR_MASK 0x5ff /* only 10 bits are implemented */
+#define DINO_LOCAL_IRQS (DINO_IRQS+1)
#define DINO_MASK_IRQ(x) (1<<(x))
@@ -146,7 +147,7 @@ struct dino_device
unsigned long txn_addr; /* EIR addr to generate interrupt */
u32 txn_data; /* EIR data assign to each dino */
u32 imr; /* IRQ's which are enabled */
- int global_irq[12]; /* map IMR bit to global irq */
+ int global_irq[DINO_LOCAL_IRQS]; /* map IMR bit to global irq */
#ifdef DINO_DEBUG
unsigned int dino_irr0; /* save most recent IRQ line stat */
#endif
@@ -297,7 +298,7 @@ struct pci_port_ops dino_port_ops = {
static void dino_disable_irq(unsigned int irq)
{
struct dino_device *dino_dev = irq_desc[irq].handler_data;
- int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, irq);
+ int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq);
@@ -309,7 +310,7 @@ static void dino_disable_irq(unsigned int irq)
static void dino_enable_irq(unsigned int irq)
{
struct dino_device *dino_dev = irq_desc[irq].handler_data;
- int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, irq);
+ int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
u32 tmp;
DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq);