linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers
@ 2010-11-26 19:57 Stefan Achatz
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Achatz @ 2010-11-26 19:57 UTC (permalink / raw)
  To: Randy Dunlap, Greg Kroah-Hartman, Jiri Kosina, Stefan Achatz,
	linux-doc

Using pack pragma to prevent padding bytes in binary data structures
used for hardware communication. Explanation of these pragmas was requested.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
---
 drivers/hid/hid-roccat-kone.h |    3 +++
 drivers/hid/hid-roccat-pyra.h |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-roccat-kone.h b/drivers/hid/hid-roccat-kone.h
index 130d656..11203a7 100644
--- a/drivers/hid/hid-roccat-kone.h
+++ b/drivers/hid/hid-roccat-kone.h
@@ -14,6 +14,9 @@
 
 #include <linux/types.h>
 
+/*
+ * Binary data structures used for hardware communication must have no padding.
+ */
 #pragma pack(push)
 #pragma pack(1)
 
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h
index 22f80a8..ac5996e 100644
--- a/drivers/hid/hid-roccat-pyra.h
+++ b/drivers/hid/hid-roccat-pyra.h
@@ -14,6 +14,9 @@
 
 #include <linux/types.h>
 
+/*
+ * Binary data structures used for hardware communication must have no padding.
+ */
 #pragma pack(push)
 #pragma pack(1)
 
-- 
1.7.2.3




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-12-02 15:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1290801456.18750.164.camel@neuromancer>
2010-11-26 20:50 ` [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers Ben Hutchings
2010-11-27  7:35   ` [PATCH] HID: roccat: replaced #pragma pack() with __packed macro Stefan Achatz
2010-11-30 17:40   ` [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers Greg KH
2010-12-02 15:04     ` Jiri Kosina
2010-12-02 15:16       ` Greg KH
2010-11-26 19:57 Stefan Achatz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).