linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Achatz <erazor_de@users.sourceforge.net>
To: Jiri Kosina <jkosina@suse.cz>
Cc: "Randy Dunlap" <rdunlap@xenotime.net>,
	"Bruno Prémont" <bonbons@linux-vserver.org>,
	"Stephane Chatty" <chatty@enac.fr>,
	"Don Prince" <dhprince-devel@yahoo.co.uk>,
	"Dmitry Torokhov" <dtor@mail.ru>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org
Subject: [PATCH 3/3] HID: roccat: declaring meaning of pack pragma usage in kone and pyra driver
Date: Sat, 06 Nov 2010 19:53:32 +0100	[thread overview]
Message-ID: <1289069612.5166.4.camel@neuromancer> (raw)
In-Reply-To: <alpine.LNX.2.00.1011051400250.15851@pobox.suse.cz>

Using pack pragma to prevent padding bytes in binary data structures
used for hardware communication. Explanation of these pragmas was requested.
This patch does for kone and pyra what another patch does for koneplus.

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..cb0ed99 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 for communication with hardware 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..31d7b3e 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 for communication with hardware must have no padding.
+ */
 #pragma pack(push)
 #pragma pack(1)
 
-- 
1.7.2.3




  parent reply	other threads:[~2010-11-06 18:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1287943025.2623.16.camel@neuromancer>
2010-11-04 18:25 ` [PATCH] HID: roccat: Add support for Roccat Kone[+] Jiri Kosina
2010-11-05 17:42   ` Stefan Achatz
2010-11-05 18:01     ` Jiri Kosina
2010-11-06 18:51       ` [PATCH 1/3] HID: roccat: Reducing number of functions in kone and pyra drivers Stefan Achatz
2010-11-06 18:52       ` [PATCH 2/3] HID: roccat: declaring meaning of pack pragma usage in koneplus driver Stefan Achatz
2010-11-06 18:53       ` Stefan Achatz [this message]
2010-11-12 19:16       ` [PATCH] HID: roccat: Add support for Roccat Kone[+] Stefan Achatz
2010-11-05 17:53   ` [PATCH] HID: roccat: Using bin-attribute->private to reduce code duplication Stefan Achatz
2010-11-11  9:00 ` [PATCH] HID: roccat: Add support for Roccat Kone[+] Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289069612.5166.4.camel@neuromancer \
    --to=erazor_de@users.sourceforge.net \
    --cc=bonbons@linux-vserver.org \
    --cc=chatty@enac.fr \
    --cc=dhprince-devel@yahoo.co.uk \
    --cc=dtor@mail.ru \
    --cc=jkosina@suse.cz \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).