drivers/media/video/v4l2-ioctl.c: fix build
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 31 Jul 2012 23:41:34 +0000 (16:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Aug 2012 01:42:39 +0000 (18:42 -0700)
Fix zillions of these:

drivers/media/video/v4l2-ioctl.c:1848: error: unknown field 'func' specified in initializer
drivers/media/video/v4l2-ioctl.c:1848: warning: missing braces around initializer
drivers/media/video/v4l2-ioctl.c:1848: warning: (near initialization for 'v4l2_ioctls[0].<anonymous>')
drivers/media/video/v4l2-ioctl.c:1848: warning: initialization makes integer from pointer without a cast
drivers/media/video/v4l2-ioctl.c:1848: error: initializer element is not computable at load time
drivers/media/video/v4l2-ioctl.c:1848: error: (near initialization for 'v4l2_ioctls[0].<anonymous>.offset')

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/media/video/v4l2-ioctl.c

index 70e0efb..4b4059d 100644 (file)
@@ -1831,7 +1831,9 @@ struct v4l2_ioctl_info {
                .ioctl = _ioctl,                                        \
                .flags = _flags | INFO_FL_STD,                          \
                .name = #_ioctl,                                        \
-               .offset = offsetof(struct v4l2_ioctl_ops, _vidioc),     \
+               {                                                       \
+                       .offset = offsetof(struct v4l2_ioctl_ops, _vidioc),\
+               },                                                      \
                .debug = _debug,                                        \
        }
 
@@ -1840,7 +1842,9 @@ struct v4l2_ioctl_info {
                .ioctl = _ioctl,                                        \
                .flags = _flags | INFO_FL_FUNC,                         \
                .name = #_ioctl,                                        \
-               .func = _func,                                          \
+               {                                                       \
+                       .func = _func,                                  \
+               },                                                      \
                .debug = _debug,                                        \
        }