aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/octeon-irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/cavium-octeon/octeon-irq.c')
-rw-r--r--arch/mips/cavium-octeon/octeon-irq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index 156aa6143e11..a22f06a6f7ca 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -1032,9 +1032,8 @@ static int octeon_irq_gpio_map_common(struct irq_domain *d,
1032 if (!octeon_irq_virq_in_range(virq)) 1032 if (!octeon_irq_virq_in_range(virq))
1033 return -EINVAL; 1033 return -EINVAL;
1034 1034
1035 hw += gpiod->base_hwirq; 1035 line = (hw + gpiod->base_hwirq) >> 6;
1036 line = hw >> 6; 1036 bit = (hw + gpiod->base_hwirq) & 63;
1037 bit = hw & 63;
1038 if (line > line_limit || octeon_irq_ciu_to_irq[line][bit] != 0) 1037 if (line > line_limit || octeon_irq_ciu_to_irq[line][bit] != 0)
1039 return -EINVAL; 1038 return -EINVAL;
1040 1039