Commit 3ed1326d authored by Ilan Elias's avatar Ilan Elias Committed by John W. Linville

NFC: Add endian annotations to nfcwilink driver

Add endian annotations to TI nfcwilink driver.
Signed-off-by: default avatarIlan Elias <ilane@ti.com>
Acked-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c4bf98b2
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*/ */
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h>
#include <linux/nfc.h> #include <linux/nfc.h>
#include <net/nfc/nci.h> #include <net/nfc/nci.h>
#include <net/nfc/nci_core.h> #include <net/nfc/nci_core.h>
...@@ -42,9 +43,9 @@ ...@@ -42,9 +43,9 @@
#define NFCWILINK_REGISTER_TIMEOUT 8000 /* 8 sec */ #define NFCWILINK_REGISTER_TIMEOUT 8000 /* 8 sec */
struct nfcwilink_hdr { struct nfcwilink_hdr {
u8 chnl; __u8 chnl;
u8 opcode; __u8 opcode;
u16 len; __le16 len;
} __packed; } __packed;
struct nfcwilink { struct nfcwilink {
...@@ -212,7 +213,7 @@ static int nfcwilink_send(struct sk_buff *skb) ...@@ -212,7 +213,7 @@ static int nfcwilink_send(struct sk_buff *skb)
return -EBUSY; return -EBUSY;
/* add the ST hdr to the start of the buffer */ /* 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); memcpy(skb_push(skb, NFCWILINK_HDR_LEN), &hdr, NFCWILINK_HDR_LEN);
/* Insert skb to shared transport layer's transmit queue. /* Insert skb to shared transport layer's transmit queue.
...@@ -239,7 +240,7 @@ static int nfcwilink_probe(struct platform_device *pdev) ...@@ -239,7 +240,7 @@ static int nfcwilink_probe(struct platform_device *pdev)
{ {
static struct nfcwilink *drv; static struct nfcwilink *drv;
int rc; int rc;
u32 protocols; __u32 protocols;
nfc_dev_dbg(&pdev->dev, "probe entry"); nfc_dev_dbg(&pdev->dev, "probe entry");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment