diff options
author | Linus Torvalds | 2011-01-10 08:15:37 -0800 |
---|---|---|
committer | Linus Torvalds | 2011-01-10 08:15:37 -0800 |
commit | facc7a96d443d84060a8679c3fcc51d20d4981c3 (patch) | |
tree | e2d633b07766609aedac0708adcde2bc2e37e68a /drivers/hid/hid-roccat-pyra.h | |
parent | c8940eca75e6d1ea57f6c491a30bd1023c64c9ad (diff) | |
parent | 4ead36407b41eae942c8c9f70ef963cd369c90e2 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits)
HID: roccat: Update sysfs attribute doc
HID: roccat: don't use #pragma pack
HID: roccat: Add support for Roccat Kone[+] v2
HID: roccat: reduce number of functions in kone and pyra drivers
HID: roccat: declare meaning of pack pragma usage in driver headers
HID: roccat: use class for char device for sysfs attribute creation
sysfs: Introducing binary attributes for struct class
HID: hidraw: add compatibility ioctl() for 32-bit applications.
HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report()
HID: picolcd: fix misuse of logical operation in place of bitop
HID: usbhid: base runtime PM on modern API
HID: replace offsets values with their corresponding BTN_* defines
HID: hid-mosart: support suspend/resume
HID: hid-mosart: ignore buttons report
HID: hid-picolcd: don't use flush_scheduled_work()
HID: simplify an index check in hid_lookup_collection
HID: Hoist assigns from ifs
HID: Remove superfluous __inline__
HID: Use vzalloc for vmalloc/memset(,0...)
HID: Add and use hid_<level>: dev_<level> equivalents
...
Diffstat (limited to 'drivers/hid/hid-roccat-pyra.h')
-rw-r--r-- | drivers/hid/hid-roccat-pyra.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h index 22f80a8f26f9..14cbbe1621e0 100644 --- a/drivers/hid/hid-roccat-pyra.h +++ b/drivers/hid/hid-roccat-pyra.h @@ -14,14 +14,11 @@ #include <linux/types.h> -#pragma pack(push) -#pragma pack(1) - struct pyra_b { uint8_t command; /* PYRA_COMMAND_B */ uint8_t size; /* always 3 */ uint8_t unknown; /* 1 */ -}; +} __attribute__ ((__packed__)); struct pyra_control { uint8_t command; /* PYRA_COMMAND_CONTROL */ @@ -31,7 +28,7 @@ struct pyra_control { */ uint8_t value; /* Range 0-4 */ uint8_t request; -}; +} __attribute__ ((__packed__)); enum pyra_control_requests { PYRA_CONTROL_REQUEST_STATUS = 0x00, @@ -43,7 +40,7 @@ struct pyra_settings { uint8_t command; /* PYRA_COMMAND_SETTINGS */ uint8_t size; /* always 3 */ uint8_t startup_profile; /* Range 0-4! */ -}; +} __attribute__ ((__packed__)); struct pyra_profile_settings { uint8_t command; /* PYRA_COMMAND_PROFILE_SETTINGS */ @@ -58,7 +55,7 @@ struct pyra_profile_settings { uint8_t light_effect; uint8_t handedness; uint16_t checksum; /* byte sum */ -}; +} __attribute__ ((__packed__)); struct pyra_profile_buttons { uint8_t command; /* PYRA_COMMAND_PROFILE_BUTTONS */ @@ -66,7 +63,7 @@ struct pyra_profile_buttons { uint8_t number; /* Range 0-4 */ uint8_t buttons[14]; uint16_t checksum; /* byte sum */ -}; +} __attribute__ ((__packed__)); struct pyra_info { uint8_t command; /* PYRA_COMMAND_INFO */ @@ -75,7 +72,7 @@ struct pyra_info { uint8_t unknown1; /* always 0 */ uint8_t unknown2; /* always 1 */ uint8_t unknown3; /* always 0 */ -}; +} __attribute__ ((__packed__)); enum pyra_commands { PYRA_COMMAND_CONTROL = 0x4, @@ -107,13 +104,13 @@ struct pyra_mouse_event_button { uint8_t type; uint8_t data1; uint8_t data2; -}; +} __attribute__ ((__packed__)); struct pyra_mouse_event_audio { uint8_t report_number; /* always 2 */ uint8_t type; uint8_t unused; /* always 0 */ -}; +} __attribute__ ((__packed__)); /* hid audio controls */ enum pyra_mouse_event_audio_types { @@ -167,9 +164,7 @@ struct pyra_roccat_report { uint8_t type; uint8_t value; uint8_t key; -}; - -#pragma pack(pop) +} __attribute__ ((__packed__)); struct pyra_device { int actual_profile; |