v4l2-compat-ioctl32: fix struct v4l2_event32 alignment
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 21 Aug 2015 09:50:09 +0000 (11:50 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:47:50 +0000 (13:47 +0900)
Union v4l2_event::u is aligned to 8 bytes on arm32. On arm64 v4l2_event32::u
is aligned to 4 bytes. As a result structures v4l2_event and v4l2_event32 have
different sizes and VIDOC_DQEVENT ioctl does not work from arm32 apps running
on arm64 kernel. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c

index 4b777be..e51fb17 100644 (file)
@@ -735,7 +735,7 @@ struct v4l2_event32 {
        __u32                           type;
        union {
                __u8                    data[64];
-       } u;
+       } u __attribute__((aligned(8)));
        __u32                           pending;
        __u32                           sequence;
        struct compat_timespec          timestamp;