[PATCH] CSR: add missing sentinels to of_device_id tables
Lothar Waßmann
LW at KARO-electronics.de
Tue Aug 2 02:42:20 EDT 2011
Hi,
Jamie Iles writes:
> The of_device_id tables used for matching should be terminated with
> empty sentinel values.
>
> Cc: Barry Song <baohua.song at csr.com>
> Signed-off-by: Jamie Iles <jamie at jamieiles.com>
> ---
> arch/arm/mach-prima2/clock.c | 1 +
> arch/arm/mach-prima2/irq.c | 1 +
> arch/arm/mach-prima2/rstc.c | 1 +
> arch/arm/mach-prima2/timer.c | 1 +
> 4 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
> index f9a2aaf..615a4e7 100644
> --- a/arch/arm/mach-prima2/clock.c
> +++ b/arch/arm/mach-prima2/clock.c
> @@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
>
> static struct of_device_id clkc_ids[] = {
> { .compatible = "sirf,prima2-clkc" },
> + {},
I would add a comment like '/* end of list sentinel */' inside the
'{}' to make it crystal clear that the empty braces are intentional.
I also would omit the comma since it would be an error adding more
entries after this one.
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
More information about the linux-arm-kernel
mailing list