Lines Matching defs:hdl

19 void v4l2_ctrl_handler_init_request(struct v4l2_ctrl_handler *hdl)
21 INIT_LIST_HEAD(&hdl->requests);
22 INIT_LIST_HEAD(&hdl->requests_queued);
23 hdl->request_is_queued = false;
24 media_request_object_init(&hdl->req_obj);
28 void v4l2_ctrl_handler_free_request(struct v4l2_ctrl_handler *hdl)
39 if (hdl->req_obj.ops || list_empty(&hdl->requests))
47 list_for_each_entry_safe(req, next_req, &hdl->requests, requests) {
53 static int v4l2_ctrl_request_clone(struct v4l2_ctrl_handler *hdl,
59 if (WARN_ON(!hdl || hdl == from))
62 if (hdl->error)
63 return hdl->error;
65 WARN_ON(hdl->lock != &hdl->_lock);
75 err = handler_new_ref(hdl, ctrl, &new_ref, false, true);
85 struct v4l2_ctrl_handler *hdl =
90 list_add_tail(&hdl->requests_queued, &main_hdl->requests_queued);
91 hdl->request_is_queued = true;
97 struct v4l2_ctrl_handler *hdl =
102 list_del_init(&hdl->requests);
103 if (hdl->request_is_queued) {
104 list_del_init(&hdl->requests_queued);
105 hdl->request_is_queued = false;
112 struct v4l2_ctrl_handler *hdl =
115 v4l2_ctrl_handler_free(hdl);
116 kfree(hdl);
142 v4l2_ctrl_request_hdl_ctrl_find(struct v4l2_ctrl_handler *hdl, u32 id)
144 struct v4l2_ctrl_ref *ref = find_ref_lock(hdl, id);
151 struct v4l2_ctrl_handler *hdl,
156 ret = v4l2_ctrl_request_clone(hdl, from);
160 from, false, &hdl->req_obj);
163 list_add_tail(&hdl->requests, &from->requests);
171 v4l2_ctrls_find_req_obj(struct v4l2_ctrl_handler *hdl,
184 obj = media_request_object_find(req, &req_ops, hdl);
206 ret = v4l2_ctrl_handler_init(new_hdl, (hdl->nr_of_buckets - 1) * 8);
208 ret = v4l2_ctrl_request_bind(req, new_hdl, hdl);
219 int v4l2_g_ext_ctrls_request(struct v4l2_ctrl_handler *hdl, struct video_device *vdev,
244 obj = v4l2_ctrls_find_req_obj(hdl, req, false);
251 hdl = container_of(obj, struct v4l2_ctrl_handler,
253 ret = v4l2_g_ext_ctrls_common(hdl, cs, vdev);
262 struct v4l2_ctrl_handler *hdl,
298 obj = v4l2_ctrls_find_req_obj(hdl, req, set);
309 hdl = container_of(obj, struct v4l2_ctrl_handler,
311 ret = try_set_ext_ctrls_common(fh, hdl, cs, vdev, set);
328 struct v4l2_ctrl_handler *hdl;
344 hdl = kzalloc(sizeof(*hdl), GFP_KERNEL);
345 if (!hdl)
348 ret = v4l2_ctrl_handler_init(hdl, (main_hdl->nr_of_buckets - 1) * 8);
350 ret = v4l2_ctrl_request_bind(req, hdl, main_hdl);
352 v4l2_ctrl_handler_free(hdl);
353 kfree(hdl);
356 hdl->request_is_queued = true;
359 hdl = container_of(obj, struct v4l2_ctrl_handler, req_obj);
361 list_for_each_entry(ref, &hdl->ctrl_refs, node) {
386 WARN_ON(!hdl->request_is_queued);
387 list_del_init(&hdl->requests_queued);
388 hdl->request_is_queued = false;
399 struct v4l2_ctrl_handler *hdl;
421 hdl = container_of(obj, struct v4l2_ctrl_handler, req_obj);
423 list_for_each_entry(ref, &hdl->ctrl_refs, node)
426 list_for_each_entry(ref, &hdl->ctrl_refs, node) {
443 find_ref(hdl, master->cluster[i]->id);
459 find_ref(hdl, master->cluster[i]->id);