[glsdk/meta-ti-glsdk.git] / recipes-bsp / linux / linux-omap / media / 0021-v4l-Replace-enums-with-fixed-sized-fields-in-public-.patch
1 From fb1156d3125e36952f884b09afb9d0815ddeafd7 Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Wed, 6 Oct 2010 08:30:26 +0200
4 Subject: [PATCH 21/43] v4l: Replace enums with fixed-sized fields in public structure
6 The v4l2_mbus_framefmt structure will be part of the public userspace
7 API and used (albeit indirectly) as an ioctl argument. As such, its size
8 must be fixed across userspace ABIs.
10 Replace the v4l2_field and v4l2_colorspace enums by __u32 fields and add
11 padding for future enhancements.
13 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
14 ---
15 include/linux/v4l2-mediabus.h | 17 +++++++++--------
16 1 files changed, 9 insertions(+), 8 deletions(-)
18 diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h
19 index a62cd64..feeb88c 100644
20 --- a/include/linux/v4l2-mediabus.h
21 +++ b/include/linux/v4l2-mediabus.h
22 @@ -63,16 +63,17 @@ enum v4l2_mbus_pixelcode {
23 * struct v4l2_mbus_framefmt - frame format on the media bus
24 * @width: frame width
25 * @height: frame height
26 - * @code: data format code
27 - * @field: used interlacing type
28 - * @colorspace: colorspace of the data
29 + * @code: data format code (from enum v4l2_mbus_pixelcode)
30 + * @field: used interlacing type (from enum v4l2_field)
31 + * @colorspace: colorspace of the data (from enum v4l2_colorspace)
32 */
33 struct v4l2_mbus_framefmt {
34 - __u32 width;
35 - __u32 height;
36 - __u32 code;
37 - enum v4l2_field field;
38 - enum v4l2_colorspace colorspace;
39 + __u32 width;
40 + __u32 height;
41 + __u32 code;
42 + __u32 field;
43 + __u32 colorspace;
44 + __u32 reserved[7];
45 };
47 #endif
48 --
49 1.6.6.1