[PATCH 3/4] plat-s5p: Add platform support for MIPI-CSI2 devices

Jamie Iles jamie at jamieiles.com
Thu Dec 2 18:14:57 EST 2010


On Thu, Dec 02, 2010 at 06:39:50PM +0100, Sylwester Nawrocki wrote:
> On 12/02/2010 06:15 PM, Jamie Iles wrote:
> > On Thu, Dec 02, 2010 at 05:37:41PM +0100, Sylwester Nawrocki wrote:
[...]
> >> +static struct resource s5p_csis_resource[] = {
> >> +	[0] = {
> >> +		.start = S5P_PA_CSIS0,
> >> +		.end   = S5P_PA_CSIS0 + SZ_4K - 1,
> >> +		.flags = IORESOURCE_MEM,
> >> +	},
> >> +	[1] = {
> >> +		.start = IRQ_MIPICSI0,
> >> +		.end   = IRQ_MIPICSI0,
> >> +		.flags = IORESOURCE_IRQ,
> >> +	}
> >> +};
> > Do you really need the [0] and [1] here? These are only needed if you are 
> > sparsely initialising an array.
> 
> I agree explicit indices are not really needed. I just followed the style of
> all other resource definitions already there.
> I am not quite sure what is the preference of the maintainer, I guess they want
> all devices to follow same style for consistence.
Ok, that's fair enough, it just looked a bit odd to me!

Jamie



More information about the linux-arm-kernel mailing list