diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2012-05-10 02:02:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 08:09:02 -0300 |
commit | 6016af82eafcb6e086a8f2a2197b46029a843d68 (patch) | |
tree | a8133e0651a8e0d5d33fbce904471a9c42127b51 /Documentation/DocBook/media/v4l/vidioc-cropcap.xml | |
parent | 121b3ddbe4ad17df77cb7284239be0a63d9a66bd (diff) | |
download | blackbird-op-linux-6016af82eafcb6e086a8f2a2197b46029a843d68.tar.gz blackbird-op-linux-6016af82eafcb6e086a8f2a2197b46029a843d68.zip |
[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>
Diffstat (limited to 'Documentation/DocBook/media/v4l/vidioc-cropcap.xml')
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-cropcap.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-cropcap.xml b/Documentation/DocBook/media/v4l/vidioc-cropcap.xml index b4f2f255211e..f1bac2c6e978 100644 --- a/Documentation/DocBook/media/v4l/vidioc-cropcap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-cropcap.xml @@ -65,7 +65,7 @@ output.</para> &cs-str; <tbody valign="top"> <row> - <entry>&v4l2-buf-type;</entry> + <entry>__u32</entry> <entry><structfield>type</structfield></entry> <entry>Type of the data stream, set by the application. Only these types are valid here: @@ -73,7 +73,7 @@ Only these types are valid here: <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>, <constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>, and custom (driver defined) types with code <constant>V4L2_BUF_TYPE_PRIVATE</constant> -and higher.</entry> +and higher. See <xref linkend="v4l2-buf-type" />.</entry> </row> <row> <entry>struct <link linkend="v4l2-rect-crop">v4l2_rect</link></entry> |