[PATCH v3 2/2] at91: add Atmel ISI and ov2640 support on sam9m10/sam9g45 board.
Guennadi Liakhovetski
g.liakhovetski at gmx.de
Mon Sep 26 07:21:17 EDT 2011
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/
More information about the linux-arm-kernel
mailing list