Revert "[media] v4l2-dv-timings: fix a sparse warning"
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 24 Oct 2014 10:57:01 +0000 (08:57 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 24 Oct 2014 10:58:09 +0000 (08:58 -0200)
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>
include/uapi/linux/v4l2-dv-timings.h

index 6a0764c89fcbeaf29cee9bf5dcba996ed9bc3c98..6c8f159e416eea1b2781b4e00139b4b3afe2ea9a 100644 (file)
 #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) */