Hi all!

Recently I had to add two new ioctls for the subdev API 
(include/linux/v4l2-subdev.h)
and I noticed that the numbering of the ioctls was somewhat random.

In most cases the ioctl number was the same as the V4L2 API counterpart, but for
subdev-specific ioctls no rule exists.

There are a few problems with this: because of the lack of rules there is a 
chance
that in the future a subdev ioctl may end up to be identical to an existing V4L2
ioctl. Also, because the numbering isn't nicely increasing it makes it hard to 
create
a lookup table as was done for the V4L2 ioctls. Well, you could do it, but it 
would
be a very sparse array, wasting a lot of memory.

Lookup tables have proven to be very useful, so we might want to introduce them 
for
the subdev core code as well in the future.

Since the subdev API is still marked experimental, I propose to renumber the 
ioctls
and use the letter 'v' instead of 'V'. 'v' was used for V4L1, and so it is now
available for reuse.

We keep the old ioctls around for a few kernel cycles, and remove them some time
next year.

Note that some V4L2 ioctls are also available for use in the subdev API (control
ioctls in particular). By using a different letter for the ioctls this will make
it easy as well to decide what lookup table to use should we decide to introduce
that in the subdev core code in the future.

Comments?

Regards,

        Hans
--
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