NFC: st21nfca: Fix sparse: cast to restricted __be32
authorChristophe Ricard <christophe.ricard@gmail.com>
Mon, 28 Jul 2014 16:11:30 +0000 (18:11 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 7 Sep 2014 21:56:46 +0000 (23:56 +0200)
Fixing "sparse: cast to restricted __be32" 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 a902b0551c86a10b0d158c76c568613144f4d254..823be16b25104cb4f806412317e36737f818e6b3 100644 (file)
@@ -355,8 +355,8 @@ static int st21nfca_hci_start_poll(struct nfc_hci_dev *hdev,
                        if (r < 0)
                                return r;
 
-                       pol_req =
-                           be32_to_cpu(ST21NFCA_RF_READER_F_POL_REQ_DEFAULT);
+                       pol_req = be32_to_cpu((__force __be32)
+                                       ST21NFCA_RF_READER_F_POL_REQ_DEFAULT);
                        r = nfc_hci_set_param(hdev, ST21NFCA_RF_READER_F_GATE,
                                              ST21NFCA_RF_READER_F_POL_REQ,
                                              (u8 *) &pol_req, 4);