Lines Matching refs:ct

153 	struct wf_control *ct = container_of(kref, struct wf_control, ref);  in wf_control_release()  local
155 DBG("wf: Deleting control %s\n", ct->name); in wf_control_release()
157 if (ct->ops && ct->ops->release) in wf_control_release()
158 ct->ops->release(ct); in wf_control_release()
160 kfree(ct); in wf_control_release()
199 struct wf_control *ct; in wf_register_control() local
202 list_for_each_entry(ct, &wf_controls, link) { in wf_register_control()
203 if (!strcmp(ct->name, new_ct->name)) { in wf_register_control()
205 " duplicate control %s\n", ct->name); in wf_register_control()
232 void wf_unregister_control(struct wf_control *ct) in wf_unregister_control() argument
235 list_del(&ct->link); in wf_unregister_control()
238 DBG("wf: Unregistered control %s\n", ct->name); in wf_unregister_control()
240 kref_put(&ct->ref, wf_control_release); in wf_unregister_control()
246 struct wf_control *ct; in wf_find_control() local
249 list_for_each_entry(ct, &wf_controls, link) { in wf_find_control()
250 if (!strcmp(ct->name, name)) { in wf_find_control()
251 if (wf_get_control(ct)) in wf_find_control()
252 ct = NULL; in wf_find_control()
254 return ct; in wf_find_control()
262 int wf_get_control(struct wf_control *ct) in wf_get_control() argument
264 if (!try_module_get(ct->ops->owner)) in wf_get_control()
266 kref_get(&ct->ref); in wf_get_control()
271 void wf_put_control(struct wf_control *ct) in wf_put_control() argument
273 struct module *mod = ct->ops->owner; in wf_put_control()
274 kref_put(&ct->ref, wf_control_release); in wf_put_control()
400 struct wf_control *ct; in wf_register_client() local
408 list_for_each_entry(ct, &wf_controls, link) in wf_register_client()
409 wf_notify(WF_EVENT_NEW_CONTROL, ct); in wf_register_client()