Lines Matching refs:llc_engine
33 static void nfc_llc_del_engine(struct nfc_llc_engine *llc_engine) in nfc_llc_del_engine() argument
35 list_del(&llc_engine->entry); in nfc_llc_del_engine()
36 kfree_const(llc_engine->name); in nfc_llc_del_engine()
37 kfree(llc_engine); in nfc_llc_del_engine()
42 struct nfc_llc_engine *llc_engine, *n; in nfc_llc_exit() local
44 list_for_each_entry_safe(llc_engine, n, &llc_engines, entry) in nfc_llc_exit()
45 nfc_llc_del_engine(llc_engine); in nfc_llc_exit()
50 struct nfc_llc_engine *llc_engine; in nfc_llc_register() local
52 llc_engine = kzalloc(sizeof(struct nfc_llc_engine), GFP_KERNEL); in nfc_llc_register()
53 if (llc_engine == NULL) in nfc_llc_register()
56 llc_engine->name = kstrdup_const(name, GFP_KERNEL); in nfc_llc_register()
57 if (llc_engine->name == NULL) { in nfc_llc_register()
58 kfree(llc_engine); in nfc_llc_register()
61 llc_engine->ops = ops; in nfc_llc_register()
63 INIT_LIST_HEAD(&llc_engine->entry); in nfc_llc_register()
64 list_add_tail(&llc_engine->entry, &llc_engines); in nfc_llc_register()
71 struct nfc_llc_engine *llc_engine; in nfc_llc_name_to_engine() local
73 list_for_each_entry(llc_engine, &llc_engines, entry) { in nfc_llc_name_to_engine()
74 if (strcmp(llc_engine->name, name) == 0) in nfc_llc_name_to_engine()
75 return llc_engine; in nfc_llc_name_to_engine()
83 struct nfc_llc_engine *llc_engine; in nfc_llc_unregister() local
85 llc_engine = nfc_llc_name_to_engine(name); in nfc_llc_unregister()
86 if (llc_engine == NULL) in nfc_llc_unregister()
89 nfc_llc_del_engine(llc_engine); in nfc_llc_unregister()
97 struct nfc_llc_engine *llc_engine; in nfc_llc_allocate() local
100 llc_engine = nfc_llc_name_to_engine(name); in nfc_llc_allocate()
101 if (llc_engine == NULL) in nfc_llc_allocate()
108 llc->data = llc_engine->ops->init(hdev, xmit_to_drv, rcv_to_hci, in nfc_llc_allocate()
116 llc->ops = llc_engine->ops; in nfc_llc_allocate()