浏览代码

NFC: st21nfca: Fix sparse: cast to restricted __be16

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>
Christophe Ricard 11 年之前
父节点
当前提交
cc3a9f7254
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/nfc/st21nfca/st21nfca.c

+ 1 - 1
drivers/nfc/st21nfca/st21nfca.c

@@ -363,7 +363,7 @@ static int st21nfca_get_iso14443_3_atqa(struct nfc_hci_dev *hdev, u16 *atqa)
 		goto exit;
 		goto exit;
 	}
 	}
 
 
-	*atqa = be16_to_cpu(*(u16 *) atqa_skb->data);
+	*atqa = be16_to_cpu(*(__be16 *) atqa_skb->data);
 
 
 exit:
 exit:
 	kfree_skb(atqa_skb);
 	kfree_skb(atqa_skb);