summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/v4l2-dv-timings.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab2014-10-24 12:57:01 +0200
committerMauro Carvalho Chehab2014-10-24 12:58:09 +0200
commit607ec6a5abb637642e5b8199828f39ceae83cfb7 (patch)
treeaddda8a45c9bf15d2c88896bf77e682dc9b3669f /include/uapi/linux/v4l2-dv-timings.h
parent[media] hackrf: harmless off by one in debug code (diff)
downloadkernel-qcow2-linux-607ec6a5abb637642e5b8199828f39ceae83cfb7.tar.gz
kernel-qcow2-linux-607ec6a5abb637642e5b8199828f39ceae83cfb7.tar.xz
kernel-qcow2-linux-607ec6a5abb637642e5b8199828f39ceae83cfb7.zip
Revert "[media] v4l2-dv-timings: fix a sparse warning"
Sparse got a fix for that. Also, it is suspected that reverting this patch might cause compilation breakages on userspace. So, revert it. This reverts commit 5c2cacc1028917168b0f7650008dceaa6f7e3fe2. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/uapi/linux/v4l2-dv-timings.h')
-rw-r--r--include/uapi/linux/v4l2-dv-timings.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/uapi/linux/v4l2-dv-timings.h b/include/uapi/linux/v4l2-dv-timings.h
index 6a0764c89fcb..6c8f159e416e 100644
--- a/include/uapi/linux/v4l2-dv-timings.h
+++ b/include/uapi/linux/v4l2-dv-timings.h
@@ -21,8 +21,17 @@
#ifndef _V4L2_DV_TIMINGS_H
#define _V4L2_DV_TIMINGS_H
+#if __GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 6))
+/* Sadly gcc versions older than 4.6 have a bug in how they initialize
+ anonymous unions where they require additional curly brackets.
+ This violates the C1x standard. This workaround adds the curly brackets
+ if needed. */
#define V4L2_INIT_BT_TIMINGS(_width, args...) \
{ .bt = { _width , ## args } }
+#else
+#define V4L2_INIT_BT_TIMINGS(_width, args...) \
+ .bt = { _width , ## args }
+#endif
/* CEA-861-E timings (i.e. standard HDTV timings) */