* [PATCH] regmap: Dynamicallly allocate a regmap_irq range if no base is specified
@ 2012-05-13 11:50 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-05-13 11:50 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown
This avoids drivers having to implement the logic and will make it easier
to add irq_domain support.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/base/regmap/regmap-irq.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 0d233cc..f9724af 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -195,6 +195,10 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
return -EINVAL;
}
+ /* Ask for a dynamic range if none is specified */
+ if (!irq_base)
+ irq_base = -1;
+
irq_base = irq_alloc_descs(irq_base, 0, chip->num_irqs, 0);
if (irq_base < 0) {
dev_warn(map->dev, "Failed to allocate IRQs: %d\n",
--
1.7.10
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-13 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-13 11:50 [PATCH] regmap: Dynamicallly allocate a regmap_irq range if no base is specified Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®