NFC: Add endian annotations to nfcwilink driver
authorIlan Elias <ilane@ti.com>
Tue, 17 Jan 2012 12:11:31 +0000 (14:11 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 24 Jan 2012 19:21:55 +0000 (14:21 -0500)
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>
drivers/nfc/nfcwilink.c

index 06c3642e5bdb0f1525c6bde54bf2c73058e1b26e..ee60d0844332218d5530ea3b62a876de79313e46 100644 (file)
@@ -28,6 +28,7 @@
  */
 #include <linux/platform_device.h>
 #include <linux/module.h>
+#include <linux/types.h>
 #include <linux/nfc.h>
 #include <net/nfc/nci.h>
 #include <net/nfc/nci_core.h>
@@ -42,9 +43,9 @@
 #define NFCWILINK_REGISTER_TIMEOUT     8000    /* 8 sec */
 
 struct nfcwilink_hdr {
-       u8 chnl;
-       u8 opcode;
-       u16 len;
+       __u8 chnl;
+       __u8 opcode;
+       __le16 len;
 } __packed;
 
 struct nfcwilink {
@@ -212,7 +213,7 @@ static int nfcwilink_send(struct sk_buff *skb)
                return -EBUSY;
 
        /* add the ST hdr to the start of the buffer */
-       hdr.len = skb->len;
+       hdr.len = cpu_to_le16(skb->len);
        memcpy(skb_push(skb, NFCWILINK_HDR_LEN), &hdr, NFCWILINK_HDR_LEN);
 
        /* Insert skb to shared transport layer's transmit queue.
@@ -239,7 +240,7 @@ static int nfcwilink_probe(struct platform_device *pdev)
 {
        static struct nfcwilink *drv;
        int rc;
-       u32 protocols;
+       __u32 protocols;
 
        nfc_dev_dbg(&pdev->dev, "probe entry");