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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux