omap_hwmod: use a terminator record with omap_hwmod_dma_info arrays
Previously, struct omap_hwmod_dma_info arrays were unterminated; and
users of these arrays used the ARRAY_SIZE() macro to determine the
length of the array. However, ARRAY_SIZE() only works when the array
is in the same scope as the macro user.
So far this hasn't been a problem. However, to reduce duplicated
data, a subsequent patch will move common data to a separate, shared
file. When this is done, ARRAY_SIZE() will no longer be usable.
This patch removes ARRAY_SIZE() usage for struct omap_hwmod_dma_info
arrays and uses a sentinel value (irq == -1) as the array terminator
instead.
Signed-off-by:
Paul Walmsley <paul@pwsan.com>
Showing
- arch/arm/mach-omap2/omap_hwmod.c 27 additions, 3 deletionsarch/arm/mach-omap2/omap_hwmod.c
- arch/arm/mach-omap2/omap_hwmod_2420_data.c 10 additions, 10 deletionsarch/arm/mach-omap2/omap_hwmod_2420_data.c
- arch/arm/mach-omap2/omap_hwmod_2430_data.c 16 additions, 16 deletionsarch/arm/mach-omap2/omap_hwmod_2430_data.c
- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c 20 additions, 23 deletionsarch/arm/mach-omap2/omap_hwmod_3xxx_data.c
- arch/arm/mach-omap2/omap_hwmod_44xx_data.c 30 additions, 30 deletionsarch/arm/mach-omap2/omap_hwmod_44xx_data.c
- arch/arm/plat-omap/include/plat/omap_hwmod.h 3 additions, 5 deletionsarch/arm/plat-omap/include/plat/omap_hwmod.h
Loading
Please register or sign in to comment