Re: [PATCH v9] Add support for M-5MOLS 8 Mega Pixel camera ISP

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

 



Hi Hans,

On Sun, Jun 05, 2011 at 02:11:14PM +0200, Hans Verkuil wrote:
> On Sunday, June 05, 2011 13:55:30 Sakari Ailus wrote:
> > On Thu, May 26, 2011 at 04:12:47PM +0900, Kim, HeungJun wrote:
> > > >> +
> > > >> +	struct v4l2_ctrl_handler handle;
> > > >> +	/* Autoexposure/exposure control cluster */
> > > >> +	struct {
> > > >> +		struct v4l2_ctrl *autoexposure;
> > > >> +		struct v4l2_ctrl *exposure;
> > > >> +	};
> > > > 
> > > > Would it be different without the anonymous struct?
> > > These two v4l2_ctrl is clustered. So, anonymous struct should be used
> > > for v4l2_ctrl_cluster().
> > 
> > It makes no difference in how the pointers are arranged in the memory.
> 
> The reason I use an anonymous struct for control clusters is that they
> nicely highlight that these two pointers belong together.
> 
> You don't need to do this, of course, but in that case you have to clearly
> group such pointers using comment(s). Alternatively, you can use a pointer
> array, but that's a pain in the ass to use in practice.
> 
> So the sole purpose of the anonymous struct is to visually group the pointers
> without making it harder to access them.
> 
> It is debatable whether it is needed if you have only one cluster. But when
> you have more than one cluster this approach is very effective.

This is fine for me as well.

-- 
Sakari Ailus
sakari dot ailus at iki dot fi
--
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