[PATCH] Consolidate clks_register() and similar

Jeremy Kerr jeremy.kerr at canonical.com
Sun Jan 10 17:23:31 EST 2010


Russell,

> --- a/arch/arm/mach-bcmring/core.c
> +++ b/arch/arm/mach-bcmring/core.c
> @@ -142,8 +142,7 @@ void __init bcmring_amba_init(void)
> 
>  	chipcHw_busInterfaceClockEnable(bus_clock);
> 
> -	for (i = 0; i < ARRAY_SIZE(lookups); i++)
> -		clkdev_add(&lookups[i]);
> +	clkdev_add_table(lookups, ARRAY_SIEZ(lookups));

SIEZ -> SIZE.

Also, perhaps a macro to simplify this common usage?

#define clkdev_add_table(clks) __clkdev_add_table(clks, ARRAY_SIZE(clks))

Cheers,


Jeremy



More information about the linux-arm-kernel mailing list