]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
nfc: st21nfca: Simplify white list building
authorChristophe Ricard <christophe.ricard@gmail.com>
Sat, 30 Apr 2016 07:12:40 +0000 (09:12 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 3 May 2016 23:31:56 +0000 (01:31 +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/st21nfca/core.c

index dd8b150fbffa0203eecde797693d8b1d08b4a10d..25ab279606c2c9c39c84474ef4c610ceb829a859 100644 (file)
@@ -262,17 +262,10 @@ static int st21nfca_hci_ready(struct nfc_hci_dev *hdev)
        int wl_size = 0;
        int r;
 
-       if (info->se_status->is_ese_present &&
-               info->se_status->is_uicc_present) {
+       if (info->se_status->is_uicc_present)
                white_list[wl_size++] = NFC_HCI_UICC_HOST_ID;
+       if (info->se_status->is_ese_present)
                white_list[wl_size++] = ST21NFCA_ESE_HOST_ID;
-       } else if (!info->se_status->is_ese_present &&
-                        info->se_status->is_uicc_present) {
-               white_list[wl_size++] = NFC_HCI_UICC_HOST_ID;
-       } else if (info->se_status->is_ese_present &&
-                       !info->se_status->is_uicc_present) {
-               white_list[wl_size++] = ST21NFCA_ESE_HOST_ID;
-       }
 
        if (wl_size) {
                r = nfc_hci_set_param(hdev, NFC_HCI_ADMIN_GATE,