aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorIlan Elias <ilane@ti.com>2012-01-17 07:11:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:21:55 -0500
commit3ed1326d2e693d555e62241c2e2209f01506214e (patch)
tree9d36a2e313719d1fafd5d673c25e870019a1f2d7 /drivers/nfc
parentc4bf98b220cba7a8618405261d69ee53a265110e (diff)
NFC: Add endian annotations to nfcwilink driver
Add endian annotations to TI nfcwilink driver. Signed-off-by: Ilan Elias <ilane@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/nfcwilink.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/nfc/nfcwilink.c b/drivers/nfc/nfcwilink.c
index 06c3642e5bdb..ee60d0844332 100644
--- a/drivers/nfc/nfcwilink.c
+++ b/drivers/nfc/nfcwilink.c
@@ -28,6 +28,7 @@
28 */ 28 */
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/types.h>
31#include <linux/nfc.h> 32#include <linux/nfc.h>
32#include <net/nfc/nci.h> 33#include <net/nfc/nci.h>
33#include <net/nfc/nci_core.h> 34#include <net/nfc/nci_core.h>
@@ -42,9 +43,9 @@
42#define NFCWILINK_REGISTER_TIMEOUT 8000 /* 8 sec */ 43#define NFCWILINK_REGISTER_TIMEOUT 8000 /* 8 sec */
43 44
44struct nfcwilink_hdr { 45struct nfcwilink_hdr {
45 u8 chnl; 46 __u8 chnl;
46 u8 opcode; 47 __u8 opcode;
47 u16 len; 48 __le16 len;
48} __packed; 49} __packed;
49 50
50struct nfcwilink { 51struct nfcwilink {
@@ -212,7 +213,7 @@ static int nfcwilink_send(struct sk_buff *skb)
212 return -EBUSY; 213 return -EBUSY;
213 214
214 /* add the ST hdr to the start of the buffer */ 215 /* add the ST hdr to the start of the buffer */
215 hdr.len = skb->len; 216 hdr.len = cpu_to_le16(skb->len);
216 memcpy(skb_push(skb, NFCWILINK_HDR_LEN), &hdr, NFCWILINK_HDR_LEN); 217 memcpy(skb_push(skb, NFCWILINK_HDR_LEN), &hdr, NFCWILINK_HDR_LEN);
217 218
218 /* Insert skb to shared transport layer's transmit queue. 219 /* Insert skb to shared transport layer's transmit queue.
@@ -239,7 +240,7 @@ static int nfcwilink_probe(struct platform_device *pdev)
239{ 240{
240 static struct nfcwilink *drv; 241 static struct nfcwilink *drv;
241 int rc; 242 int rc;
242 u32 protocols; 243 __u32 protocols;
243 244
244 nfc_dev_dbg(&pdev->dev, "probe entry"); 245 nfc_dev_dbg(&pdev->dev, "probe entry");
245 246