linux/Documentation/DocBook
Sakari Ailus 6016af82ea [media] v4l2: use __u32 rather than enums in ioctl() structs
V4L2 uses the enum type in IOCTL arguments in IOCTLs that were defined until
the use of enum was considered less than ideal. Recently Rémi Denis-Courmont
brought up the issue by proposing a patch to convert the enums to unsigned:

<URL:http://www.spinics.net/lists/linux-media/msg46167.html>

This sparked a long discussion where another solution to the issue was
proposed: two sets of IOCTL structures, one with __u32 and the other with
enums, and conversion code between the two:

<URL:http://www.spinics.net/lists/linux-media/msg47168.html>

Both approaches implement a complete solution that resolves the problem. The
first one is simple but requires assuming enums and __u32 are the same in
size (so we won't break the ABI) while the second one is more complex and
less clean but does not require making that assumption.

The issue boils down to whether enums are fundamentally different from __u32
or not, and can the former be substituted by the latter. During the
discussion it was concluded that the __u32 has the same size as enums on all
archs Linux is supported: it has not been shown that replacing those enums
in IOCTL arguments would break neither source or binary compatibility. If no
such reason is found, just replacing the enums with __u32s is the way to go.

This is what this patch does. This patch is slightly different from Remi's
first RFC (link above): it uses __u32 instead of unsigned and also changes
the arguments of VIDIOC_G_PRIORITY and VIDIOC_S_PRIORITY.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 08:09:02 -03:00
..
media [media] v4l2: use __u32 rather than enums in ioctl() structs 2012-05-14 08:09:02 -03:00
.gitignore [media] DocBook: Add a chapter to describe media errors 2011-07-27 17:53:35 -03:00
80211.tmpl cfg80211: stop tracking authenticated state 2012-02-06 14:50:37 -05:00
alsa-driver-api.tmpl ALSA: Move ALSA docbooks to be with the rest of the kernel docbooks 2009-03-09 15:22:59 +01:00
debugobjects.tmpl debugobjects: Extend to assert that an object is initialized 2011-11-23 18:49:22 +01:00
device-drivers.tmpl Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi 2012-04-02 09:50:40 -07:00
deviceiobook.tmpl docbook: change iomap source filename in deviceiobook 2012-01-23 08:44:54 -08:00
drm.tmpl DocBook/drm: Clean up a todo-note 2011-08-29 20:00:37 +00:00
filesystems.tmpl Documentation: broken URL in filesystems.tmpl 2012-02-28 15:56:09 +01:00
gadget.tmpl usb gadget: cdc obex glue 2008-10-17 14:40:53 -07:00
genericirq.tmpl genirq: Update DocBook comments 2011-04-23 15:56:23 +02:00
kernel-api.tmpl docbook: add idr/ida to kernel-api docbook 2010-10-26 17:40:56 -07:00
kernel-hacking.tmpl sched: Generalize sleep inside spinlock detection 2011-06-23 00:44:38 +02:00
kernel-locking.tmpl Fix common misspellings 2011-03-31 11:26:23 -03:00
kgdb.tmpl kgdb,debug_core: add the ability to control the reboot notifier 2012-03-22 15:07:16 -05:00
libata.tmpl Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
librs.tmpl
lsm.tmpl Add missing section ID to lsm.tmpl 2008-02-07 08:42:16 -08:00
Makefile [media] DocBook: Use base64 for gif/png files 2011-07-27 17:52:59 -03:00
mcabook.tmpl Rationalise Randy's address a bit 2008-10-30 11:38:47 -07:00
media_api.tmpl [media] DVB: Point to the generic error chapter 2011-07-27 17:53:37 -03:00
mtdnand.tmpl mtd: doc: remove mention of MEMSETOOBSEL 2011-09-11 15:02:18 +03:00
networking.tmpl wimax: Makefile, Kconfig and docbook linkage for the stack 2009-01-07 10:00:17 -08:00
rapidio.tmpl docbook: fix rapidio warning 2011-03-27 19:30:19 -07:00
regulator.tmpl Fix common misspellings 2011-03-31 11:26:23 -03:00
s390-drivers.tmpl docbook: fix s390 fatal error after header files moved 2008-08-05 16:56:29 -07:00
scsi.tmpl Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
sh.tmpl sh: clkfwk: Kill off unused clk_set_rate_ex(). 2010-11-15 18:25:12 +09:00
stylesheet.xsl docbook: use IDs as filenames to support multiple books 2010-08-05 13:21:24 -07:00
tracepoint.tmpl workqueue: Add a workqueue chapter to the tracepoint docbook 2010-08-27 12:27:36 +02:00
uio-howto.tmpl uio: documentation fixups 2011-11-15 11:14:01 -08:00
usb.tmpl Fix common misspellings 2011-03-31 11:26:23 -03:00
writing-an-alsa-driver.tmpl ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
writing_usb_driver.tmpl USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00
z8530book.tmpl Rationalise Randy's address a bit 2008-10-30 11:38:47 -07:00