NFC: st21nfca: Fix sparse: cast to restricted __be16
authorChristophe Ricard <christophe.ricard@gmail.com>
Mon, 31 Mar 2014 22:34:00 +0000 (00:34 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 21 Apr 2014 22:37:29 +0000 (00:37 +0200)
Fixing "sparse: cast to restricted __be16" message when building with
make C=1 CF=-D__CHECK_ENDIAN__

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/st21nfca/st21nfca.c

index 9e9b9f1140c89b98d3f9ba628dc42e3fec072c7d..32d5e8742ee8d8d6fa8040be3b109c1721ed42f5 100644 (file)
@@ -363,7 +363,7 @@ static int st21nfca_get_iso14443_3_atqa(struct nfc_hci_dev *hdev, u16 *atqa)
                goto exit;
        }
 
-       *atqa = be16_to_cpu(*(u16 *) atqa_skb->data);
+       *atqa = be16_to_cpu(*(__be16 *) atqa_skb->data);
 
 exit:
        kfree_skb(atqa_skb);