From cde4856e612111ce91258b947051a08703cd1499 Mon Sep 17 00:00:00 2001 From: Christophe Ricard Date: Sat, 30 Apr 2016 09:12:41 +0200 Subject: [PATCH] nfc: st-nci: Simplify white list building Simplify white list Building Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz --- drivers/nfc/st-nci/se.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index a53e5df803eb..79efccd13172 100644 --- a/drivers/nfc/st-nci/se.c +++ b/drivers/nfc/st-nci/se.c @@ -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, -- 2.39.5