NFC: digital: Use matching_[im|tm]_protocols to check with NFC protocols masks
authorAxel Lin <axel.lin@ingics.com>
Sat, 22 Feb 2014 02:16:11 +0000 (10:16 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 23 Feb 2014 22:34:09 +0000 (23:34 +0100)
This ensures we won't add polling function to the table of polling technologies
for non-supported protocols.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/digital_core.c

index 969a7f924a3719140f5d27328a1cdbdbfa7de9fc..492fa7355e0d394b8dfe860b48bc968d9c03bf6b 100644 (file)
@@ -475,7 +475,7 @@ static int digital_start_poll(struct nfc_dev *nfc_dev, __u32 im_protocols,
                digital_add_poll_tech(ddev, NFC_DIGITAL_RF_TECH_106A,
                                      digital_in_send_sens_req);
 
-       if (im_protocols & DIGITAL_PROTO_NFCF_RF_TECH) {
+       if (matching_im_protocols & DIGITAL_PROTO_NFCF_RF_TECH) {
                digital_add_poll_tech(ddev, NFC_DIGITAL_RF_TECH_212F,
                                      digital_in_send_sensf_req);
 
@@ -487,7 +487,7 @@ static int digital_start_poll(struct nfc_dev *nfc_dev, __u32 im_protocols,
                digital_add_poll_tech(ddev, NFC_DIGITAL_RF_TECH_ISO15693,
                                      digital_in_send_iso15693_inv_req);
 
-       if (tm_protocols & NFC_PROTO_NFC_DEP_MASK) {
+       if (matching_tm_protocols & NFC_PROTO_NFC_DEP_MASK) {
                if (ddev->ops->tg_listen_mdaa) {
                        digital_add_poll_tech(ddev, 0,
                                              digital_tg_listen_mdaa);