Lines Matching full:se

125 		pr_err("SE discovery failed\n");  in nfc_dev_up()
534 struct nfc_se *se; in nfc_find_se() local
536 list_for_each_entry(se, &dev->secure_elements, list) in nfc_find_se()
537 if (se->idx == se_idx) in nfc_find_se()
538 return se; in nfc_find_se()
546 struct nfc_se *se; in nfc_enable_se() local
549 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_enable_se()
573 se = nfc_find_se(dev, se_idx); in nfc_enable_se()
574 if (!se) { in nfc_enable_se()
579 if (se->state == NFC_SE_ENABLED) { in nfc_enable_se()
586 se->state = NFC_SE_ENABLED; in nfc_enable_se()
595 struct nfc_se *se; in nfc_disable_se() local
598 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_disable_se()
617 se = nfc_find_se(dev, se_idx); in nfc_disable_se()
618 if (!se) { in nfc_disable_se()
623 if (se->state == NFC_SE_DISABLED) { in nfc_disable_se()
630 se->state = NFC_SE_DISABLED; in nfc_disable_se()
867 struct nfc_se *se; in nfc_add_se() local
870 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_add_se()
872 se = nfc_find_se(dev, se_idx); in nfc_add_se()
873 if (se) in nfc_add_se()
876 se = kzalloc(sizeof(struct nfc_se), GFP_KERNEL); in nfc_add_se()
877 if (!se) in nfc_add_se()
880 se->idx = se_idx; in nfc_add_se()
881 se->type = type; in nfc_add_se()
882 se->state = NFC_SE_DISABLED; in nfc_add_se()
883 INIT_LIST_HEAD(&se->list); in nfc_add_se()
885 list_add(&se->list, &dev->secure_elements); in nfc_add_se()
889 list_del(&se->list); in nfc_add_se()
890 kfree(se); in nfc_add_se()
901 struct nfc_se *se, *n; in nfc_remove_se() local
904 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_remove_se()
906 list_for_each_entry_safe(se, n, &dev->secure_elements, list) in nfc_remove_se()
907 if (se->idx == se_idx) { in nfc_remove_se()
912 list_del(&se->list); in nfc_remove_se()
913 kfree(se); in nfc_remove_se()
959 struct nfc_se *se, *n; in nfc_release() local
966 list_for_each_entry_safe(se, n, &dev->secure_elements, list) { in nfc_release()
967 nfc_genl_se_removed(dev, se->idx); in nfc_release()
968 list_del(&se->list); in nfc_release()
969 kfree(se); in nfc_release()