lkml.org 
[lkml]   [2010]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/3] HID: roccat: declaring meaning of pack pragma usage in koneplus driver
From
Date
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-koneplus.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-roccat-koneplus.h b/drivers/hid/hid-roccat-koneplus.h
index bf750fa..c25a799 100644
--- a/drivers/hid/hid-roccat-koneplus.h
+++ b/drivers/hid/hid-roccat-koneplus.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




\
 
 \ /
  Last update: 2010-11-06 19:55    [W:0.046 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site