On Thu, 6 Aug 2009, Hans Verkuil wrote:
> On Thursday 06 August 2009 20:10:38 Trent Piepho wrote:
> > On Thu, 6 Aug 2009, Hans Verkuil wrote:
> > > > Why do you need two routines that will always return zero? Why to 
> > > > create a
> > > > code
> > > > that will never be used? v4l2-compat-ioctl32.c is already complex enough
> > > > without adding any bogus code.
> > >
> > > When the RDS encoder driver from Eduardo is added, then he will add the
> > > string controls to ctrl_is_pointer() since his driver is the first to
> > > actually implement string controls.
> >
> > Could one of the upper bits of the control id be used as a flag?  It would
> > make it a lot easier to check the control's type than by using some inline
> > function with a giant case statement that needs to be updated each time a
> > new control is added.
>
> No, you can't. That would require users to OR that flag each time you want
> to use such a control. My original plan was to just check for a non-zero

There is no reason we need to allocated control IDs sequentially, is there?

So just give string controls IDs in the range 0x80000000 to 0xffffffff and
then one can tell if a control is a string control be ANDing the id with
(1<<31).
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to