RE: [PATCH v3 2/2] at91: add Atmel ISI and ov2640 support onsam9m10/sam9g45 board.

From: Guennadi Liakhovetski
Date: Mon Sep 26 2011 - 07:24:08 EST


On Mon, 26 Sep 2011, Wu, Josh wrote:

> On Thu, 22 Sep 2011, Guennadi wrote:
>
> > On Thu, 22 Sep 2011, Josh Wu wrote:

[snip]

> >> diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
> >> index e04c5fb..5e23d6d 100644
> >> --- a/arch/arm/mach-at91/at91sam9g45.c
> >> +++ b/arch/arm/mach-at91/at91sam9g45.c
> >> @@ -201,6 +201,7 @@ static struct clk *periph_clocks[] __initdata = {
> >> // irq0
> >> };
> >>
> >> +static struct clk pck1;
>
> > Hm, it really doesn't need any initialisation, not even for the .type
> > field? .type=0 doesn't seem to be valid.
>
> This line is only a forward declaration. Since the real definition is behind the code we use it.
> It defined in later lines:
>
> static struct clk pck1 = {
> .name = "pck1",
> .pmc_mask = AT91_PMC_PCK1,
> .type = CLK_TYPE_PROGRAMMABLE,
> .id = 1,
> };

Ehem, yes, that's why I'm not very fond of forward declarations of
structs... Without looking at the code - would it be possible to swap the
order while still preserving clean source-code structure?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/