Skip to content

Commit

Permalink
HID: uhid: use __packed__ for uhid_feature_answer_req
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Herrmann authored and Jiri Kosina committed Jan 3, 2013
1 parent f425458 commit fee5dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/uapi/linux/uhid.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fee5dfe

Please sign in to comment.