summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/generic-chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 1c39ecc..2f274f3 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -278,7 +278,7 @@ int irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip,
if (d->revmap_type != IRQ_DOMAIN_MAP_LINEAR)
return -EINVAL;
- numchips = d->revmap_data.linear.size / irqs_per_chip;
+ numchips = DIV_ROUND_UP(d->revmap_data.linear.size, irqs_per_chip);
if (!numchips)
return -EINVAL;
OpenPOWER on IntegriCloud