Lines Matching full:se
125 pr_err("SE discovery failed\n"); in nfc_dev_up()
536 struct nfc_se *se; in nfc_find_se() local
538 list_for_each_entry(se, &dev->secure_elements, list) in nfc_find_se()
539 if (se->idx == se_idx) in nfc_find_se()
540 return se; in nfc_find_se()
548 struct nfc_se *se; in nfc_enable_se() local
551 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_enable_se()
575 se = nfc_find_se(dev, se_idx); in nfc_enable_se()
576 if (!se) { in nfc_enable_se()
581 if (se->state == NFC_SE_ENABLED) { in nfc_enable_se()
588 se->state = NFC_SE_ENABLED; in nfc_enable_se()
597 struct nfc_se *se; in nfc_disable_se() local
600 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_disable_se()
619 se = nfc_find_se(dev, se_idx); in nfc_disable_se()
620 if (!se) { in nfc_disable_se()
625 if (se->state == NFC_SE_DISABLED) { in nfc_disable_se()
632 se->state = NFC_SE_DISABLED; in nfc_disable_se()
873 struct nfc_se *se; in nfc_add_se() local
876 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_add_se()
878 se = nfc_find_se(dev, se_idx); in nfc_add_se()
879 if (se) in nfc_add_se()
882 se = kzalloc(sizeof(struct nfc_se), GFP_KERNEL); in nfc_add_se()
883 if (!se) in nfc_add_se()
886 se->idx = se_idx; in nfc_add_se()
887 se->type = type; in nfc_add_se()
888 se->state = NFC_SE_DISABLED; in nfc_add_se()
889 INIT_LIST_HEAD(&se->list); in nfc_add_se()
891 list_add(&se->list, &dev->secure_elements); in nfc_add_se()
895 list_del(&se->list); in nfc_add_se()
896 kfree(se); in nfc_add_se()
907 struct nfc_se *se, *n; in nfc_remove_se() local
910 pr_debug("%s se index %d\n", dev_name(&dev->dev), se_idx); in nfc_remove_se()
912 list_for_each_entry_safe(se, n, &dev->secure_elements, list) in nfc_remove_se()
913 if (se->idx == se_idx) { in nfc_remove_se()
918 list_del(&se->list); in nfc_remove_se()
919 kfree(se); in nfc_remove_se()
965 struct nfc_se *se, *n; in nfc_release() local
972 list_for_each_entry_safe(se, n, &dev->secure_elements, list) { in nfc_release()
973 nfc_genl_se_removed(dev, se->idx); in nfc_release()
974 list_del(&se->list); in nfc_release()
975 kfree(se); in nfc_release()