aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2009-12-08 18:34:16 -0500
committerpaul <paul@twilight.(none)>2009-12-11 19:00:43 -0500
commit718bfd76932c566f79eb55083693ef0b68071bf8 (patch)
treeb12d20715e1b419c6a9ed4b0d163a40e69ad83d1 /arch/arm/mach-omap2/omap_hwmod.c
parent726072e5dd459e3831d1dd4308ba469ff3ded419 (diff)
OMAP hwmod: add names to module MPU IRQ lines
Replace the existing u8 array of module MPU IRQ lines with a struct that includes a name - similar to the existing struct omap_hwmod_dma_info. Device drivers can then use platform_get_resource_byname() to retrieve specific IRQs without nasty dependencies on array ordering. Thanks to Benoît Cousson <b-cousson@ti.com> and Kevin Hilman <khilman@deeprootsystems.com> for feedback on this approach. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Benoît Cousson <b-cousson@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index b01da1ed822..61d220c5d48 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1386,8 +1386,9 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
1386 /* For each IRQ, DMA, memory area, fill in array.*/ 1386 /* For each IRQ, DMA, memory area, fill in array.*/
1387 1387
1388 for (i = 0; i < oh->mpu_irqs_cnt; i++) { 1388 for (i = 0; i < oh->mpu_irqs_cnt; i++) {
1389 (res + r)->start = *(oh->mpu_irqs + i); 1389 (res + r)->name = (oh->mpu_irqs + i)->name;
1390 (res + r)->end = *(oh->mpu_irqs + i); 1390 (res + r)->start = (oh->mpu_irqs + i)->irq;
1391 (res + r)->end = (oh->mpu_irqs + i)->irq;
1391 (res + r)->flags = IORESOURCE_IRQ; 1392 (res + r)->flags = IORESOURCE_IRQ;
1392 r++; 1393 r++;
1393 } 1394 }