Lines Matching refs:llc_engine
35 struct nfc_llc_engine *llc_engine, *n; in nfc_llc_exit() local
37 list_for_each_entry_safe(llc_engine, n, &llc_engines, entry) { in nfc_llc_exit()
38 list_del(&llc_engine->entry); in nfc_llc_exit()
39 kfree(llc_engine->name); in nfc_llc_exit()
40 kfree(llc_engine); in nfc_llc_exit()
46 struct nfc_llc_engine *llc_engine; in nfc_llc_register() local
48 llc_engine = kzalloc(sizeof(struct nfc_llc_engine), GFP_KERNEL); in nfc_llc_register()
49 if (llc_engine == NULL) in nfc_llc_register()
52 llc_engine->name = kstrdup(name, GFP_KERNEL); in nfc_llc_register()
53 if (llc_engine->name == NULL) { in nfc_llc_register()
54 kfree(llc_engine); in nfc_llc_register()
57 llc_engine->ops = ops; in nfc_llc_register()
59 INIT_LIST_HEAD(&llc_engine->entry); in nfc_llc_register()
60 list_add_tail(&llc_engine->entry, &llc_engines); in nfc_llc_register()
67 struct nfc_llc_engine *llc_engine; in nfc_llc_name_to_engine() local
69 list_for_each_entry(llc_engine, &llc_engines, entry) { in nfc_llc_name_to_engine()
70 if (strcmp(llc_engine->name, name) == 0) in nfc_llc_name_to_engine()
71 return llc_engine; in nfc_llc_name_to_engine()
79 struct nfc_llc_engine *llc_engine; in nfc_llc_unregister() local
81 llc_engine = nfc_llc_name_to_engine(name); in nfc_llc_unregister()
82 if (llc_engine == NULL) in nfc_llc_unregister()
85 list_del(&llc_engine->entry); in nfc_llc_unregister()
86 kfree(llc_engine->name); in nfc_llc_unregister()
87 kfree(llc_engine); in nfc_llc_unregister()
95 struct nfc_llc_engine *llc_engine; in nfc_llc_allocate() local
98 llc_engine = nfc_llc_name_to_engine(name); in nfc_llc_allocate()
99 if (llc_engine == NULL) in nfc_llc_allocate()
106 llc->data = llc_engine->ops->init(hdev, xmit_to_drv, rcv_to_hci, in nfc_llc_allocate()
114 llc->ops = llc_engine->ops; in nfc_llc_allocate()