nfc: st-nci: Simplify white list building
authorChristophe Ricard <christophe.ricard@gmail.com>
Sat, 30 Apr 2016 07:12:41 +0000 (09:12 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 3 May 2016 23:32:25 +0000 (01:32 +0200)
Simplify white list Building

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

index a53e5df803eb22531795876b77da9691d83b98b6..79efccd1317278262e41d6fc6272e536bc9f6319 100644 (file)
@@ -629,17 +629,10 @@ int st_nci_discover_se(struct nci_dev *ndev)
        if (test_bit(ST_NCI_FACTORY_MODE, &info->flags))
                return 0;
 
-       if (info->se_info.se_status->is_ese_present &&
-           info->se_info.se_status->is_uicc_present) {
-               white_list[wl_size++] = ST_NCI_UICC_HOST_ID;
-               white_list[wl_size++] = ST_NCI_ESE_HOST_ID;
-       } else if (!info->se_info.se_status->is_ese_present &&
-                  info->se_info.se_status->is_uicc_present) {
+       if (info->se_info.se_status->is_uicc_present)
                white_list[wl_size++] = ST_NCI_UICC_HOST_ID;
-       } else if (info->se_info.se_status->is_ese_present &&
-                  !info->se_info.se_status->is_uicc_present) {
+       if (info->se_info.se_status->is_ese_present)
                white_list[wl_size++] = ST_NCI_ESE_HOST_ID;
-       }
 
        if (wl_size) {
                r = nci_hci_set_param(ndev, NCI_HCI_ADMIN_GATE,