History

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.

Mauro Carvalho Chehab committed 12 years ago

Commit 607ec6a1 parent 9f93c521 file · +9 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/v4l2-dv-timings.h+9−0
@@ -21,8 +21,17 @@ · 20 unmodified lines
2121 #ifndef _V4L2_DV_TIMINGS_H
2222 #define _V4L2_DV_TIMINGS_H
2323
24+#if __GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 6))
25+/* Sadly gcc versions older than 4.6 have a bug in how they initialize
26+ anonymous unions where they require additional curly brackets.
27+ This violates the C1x standard. This workaround adds the curly brackets
28+ if needed. */
2429 #define V4L2_INIT_BT_TIMINGS(_width, args...) \
2530 { .bt = { _width , ## args } }
31+#else
32+#define V4L2_INIT_BT_TIMINGS(_width, args...) \
33+ .bt = { _width , ## args }
34+#endif
2635
2736 /* CEA-861-E timings (i.e. standard HDTV timings) */
2837