]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
HID: uhid: use __packed__ for uhid_feature_answer_req
authorDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 17 Dec 2012 12:20:43 +0000 (13:20 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 3 Jan 2013 09:38:24 +0000 (10:38 +0100)
We use __packed__ for all API structures so we can extend them without
breaking alignment rules. We do try to explicitly align the structures,
but to be safe we also use __packed__.
uhid_feature_answer_req is already 64bit aligned so we can add __packed__
without breaking ABI.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
include/uapi/linux/uhid.h

index 9c6974f169661d6495069e15018dad33a5b237f5..e9ed951e2b09c11bd010520e5ff0119b201ae1c9 100644 (file)
@@ -86,7 +86,7 @@ struct uhid_feature_answer_req {
        __u16 err;
        __u16 size;
        __u8 data[UHID_DATA_MAX];
-};
+} __attribute__((__packed__));
 
 struct uhid_event {
        __u32 type;