Lines Matching refs:opts

147 	struct f_uvc_opts *opts;					\
155 opts = to_f_uvc_opts(opts_item); \
157 mutex_lock(&opts->lock); \
159 mutex_unlock(&opts->lock); \
170 struct f_uvc_opts *opts; \
179 opts = to_f_uvc_opts(opts_item); \
181 mutex_lock(&opts->lock); \
182 if (ch->linked || opts->refcnt) { \
198 mutex_unlock(&opts->lock); \
265 struct f_uvc_opts *opts; \
274 opts = to_f_uvc_opts(opts_item); \
275 pd = &opts->uvc_processing; \
277 mutex_lock(&opts->lock); \
279 mutex_unlock(&opts->lock); \
298 struct f_uvc_opts *opts; in uvcg_default_processing_bm_controls_show() local
308 opts = to_f_uvc_opts(opts_item); in uvcg_default_processing_bm_controls_show()
309 pd = &opts->uvc_processing; in uvcg_default_processing_bm_controls_show()
311 mutex_lock(&opts->lock); in uvcg_default_processing_bm_controls_show()
316 mutex_unlock(&opts->lock); in uvcg_default_processing_bm_controls_show()
368 struct f_uvc_opts *opts; \
378 opts = to_f_uvc_opts(opts_item); \
379 cd = &opts->uvc_camera_terminal; \
381 mutex_lock(&opts->lock); \
383 mutex_unlock(&opts->lock); \
409 struct f_uvc_opts *opts; in uvcg_default_camera_bm_controls_show() local
420 opts = to_f_uvc_opts(opts_item); in uvcg_default_camera_bm_controls_show()
421 cd = &opts->uvc_camera_terminal; in uvcg_default_camera_bm_controls_show()
423 mutex_lock(&opts->lock); in uvcg_default_camera_bm_controls_show()
428 mutex_unlock(&opts->lock); in uvcg_default_camera_bm_controls_show()
482 struct f_uvc_opts *opts; \
492 opts = to_f_uvc_opts(opts_item); \
493 cd = &opts->uvc_output_terminal; \
495 mutex_lock(&opts->lock); \
497 mutex_unlock(&opts->lock); \
594 struct f_uvc_opts *opts; in uvcg_control_class_allow_link() local
607 opts = to_f_uvc_opts(control->ci_parent); in uvcg_control_class_allow_link()
609 mutex_lock(&opts->lock); in uvcg_control_class_allow_link()
611 class_array = uvcg_get_ctl_class_arr(src, opts); in uvcg_control_class_allow_link()
614 if (opts->refcnt || class_array[0]) { in uvcg_control_class_allow_link()
625 mutex_unlock(&opts->lock); in uvcg_control_class_allow_link()
636 struct f_uvc_opts *opts; in uvcg_control_class_drop_link() local
648 opts = to_f_uvc_opts(control->ci_parent); in uvcg_control_class_drop_link()
650 mutex_lock(&opts->lock); in uvcg_control_class_drop_link()
652 class_array = uvcg_get_ctl_class_arr(src, opts); in uvcg_control_class_drop_link()
653 if (!class_array || opts->refcnt) in uvcg_control_class_drop_link()
661 mutex_unlock(&opts->lock); in uvcg_control_class_drop_link()
723 struct f_uvc_opts *opts; in uvcg_default_control_b_interface_number_show() local
729 opts = to_f_uvc_opts(opts_item); in uvcg_default_control_b_interface_number_show()
731 mutex_lock(&opts->lock); in uvcg_default_control_b_interface_number_show()
732 result += sprintf(page, "%u\n", opts->control_interface); in uvcg_default_control_b_interface_number_show()
733 mutex_unlock(&opts->lock); in uvcg_default_control_b_interface_number_show()
795 struct f_uvc_opts *opts; in uvcg_format_bma_controls_show() local
804 opts = to_f_uvc_opts(opts_item); in uvcg_format_bma_controls_show()
806 mutex_lock(&opts->lock); in uvcg_format_bma_controls_show()
813 mutex_unlock(&opts->lock); in uvcg_format_bma_controls_show()
822 struct f_uvc_opts *opts; in uvcg_format_bma_controls_store() local
830 opts = to_f_uvc_opts(opts_item); in uvcg_format_bma_controls_store()
832 mutex_lock(&opts->lock); in uvcg_format_bma_controls_store()
833 if (ch->linked || opts->refcnt) { in uvcg_format_bma_controls_store()
846 mutex_unlock(&opts->lock); in uvcg_format_bma_controls_store()
881 struct f_uvc_opts *opts; in uvcg_streaming_header_allow_link() local
891 opts = to_f_uvc_opts(opts_item); in uvcg_streaming_header_allow_link()
893 mutex_lock(&opts->lock); in uvcg_streaming_header_allow_link()
937 mutex_unlock(&opts->lock); in uvcg_streaming_header_allow_link()
947 struct f_uvc_opts *opts; in uvcg_streaming_header_drop_link() local
956 opts = to_f_uvc_opts(opts_item); in uvcg_streaming_header_drop_link()
958 mutex_lock(&opts->lock); in uvcg_streaming_header_drop_link()
975 mutex_unlock(&opts->lock); in uvcg_streaming_header_drop_link()
990 struct f_uvc_opts *opts; \
998 opts = to_f_uvc_opts(opts_item); \
1000 mutex_lock(&opts->lock); \
1002 mutex_unlock(&opts->lock); \
1105 struct f_uvc_opts *opts; \
1113 opts = to_f_uvc_opts(opts_item); \
1115 mutex_lock(&opts->lock); \
1117 mutex_unlock(&opts->lock); \
1127 struct f_uvc_opts *opts; \
1141 opts = to_f_uvc_opts(opts_item); \
1144 mutex_lock(&opts->lock); \
1145 if (fmt->linked || opts->refcnt) { \
1153 mutex_unlock(&opts->lock); \
1165 struct f_uvc_opts *opts; in uvcg_frame_b_frame_index_show() local
1182 opts = to_f_uvc_opts(opts_item); in uvcg_frame_b_frame_index_show()
1184 mutex_lock(&opts->lock); in uvcg_frame_b_frame_index_show()
1186 mutex_unlock(&opts->lock); in uvcg_frame_b_frame_index_show()
1210 struct f_uvc_opts *opts; in uvcg_frame_dw_frame_interval_show() local
1219 opts = to_f_uvc_opts(opts_item); in uvcg_frame_dw_frame_interval_show()
1221 mutex_lock(&opts->lock); in uvcg_frame_dw_frame_interval_show()
1226 mutex_unlock(&opts->lock); in uvcg_frame_dw_frame_interval_show()
1287 struct f_uvc_opts *opts; in uvcg_frame_dw_frame_interval_store() local
1297 opts = to_f_uvc_opts(opts_item); in uvcg_frame_dw_frame_interval_store()
1300 mutex_lock(&opts->lock); in uvcg_frame_dw_frame_interval_store()
1301 if (fmt->linked || opts->refcnt) { in uvcg_frame_dw_frame_interval_store()
1330 mutex_unlock(&opts->lock); in uvcg_frame_dw_frame_interval_store()
1380 struct f_uvc_opts *opts; in uvcg_frame_make() local
1398 opts = to_f_uvc_opts(opts_item); in uvcg_frame_make()
1400 mutex_lock(&opts->lock); in uvcg_frame_make()
1412 mutex_unlock(&opts->lock); in uvcg_frame_make()
1417 mutex_unlock(&opts->lock); in uvcg_frame_make()
1430 struct f_uvc_opts *opts; in uvcg_frame_drop() local
1434 opts = to_f_uvc_opts(opts_item); in uvcg_frame_drop()
1436 mutex_lock(&opts->lock); in uvcg_frame_drop()
1439 mutex_unlock(&opts->lock); in uvcg_frame_drop()
1486 struct f_uvc_opts *opts; in uvcg_uncompressed_guid_format_show() local
1493 opts = to_f_uvc_opts(opts_item); in uvcg_uncompressed_guid_format_show()
1495 mutex_lock(&opts->lock); in uvcg_uncompressed_guid_format_show()
1497 mutex_unlock(&opts->lock); in uvcg_uncompressed_guid_format_show()
1508 struct f_uvc_opts *opts; in uvcg_uncompressed_guid_format_store() local
1516 opts = to_f_uvc_opts(opts_item); in uvcg_uncompressed_guid_format_store()
1518 mutex_lock(&opts->lock); in uvcg_uncompressed_guid_format_store()
1519 if (ch->fmt.linked || opts->refcnt) { in uvcg_uncompressed_guid_format_store()
1529 mutex_unlock(&opts->lock); in uvcg_uncompressed_guid_format_store()
1541 struct f_uvc_opts *opts; \
1549 opts = to_f_uvc_opts(opts_item); \
1551 mutex_lock(&opts->lock); \
1553 mutex_unlock(&opts->lock); \
1566 struct f_uvc_opts *opts; \
1574 opts = to_f_uvc_opts(opts_item); \
1576 mutex_lock(&opts->lock); \
1578 mutex_unlock(&opts->lock); \
1589 struct f_uvc_opts *opts; \
1598 opts = to_f_uvc_opts(opts_item); \
1600 mutex_lock(&opts->lock); \
1601 if (u->fmt.linked || opts->refcnt) { \
1613 mutex_unlock(&opts->lock); \
1735 struct f_uvc_opts *opts; \
1743 opts = to_f_uvc_opts(opts_item); \
1745 mutex_lock(&opts->lock); \
1747 mutex_unlock(&opts->lock); \
1759 struct f_uvc_opts *opts; \
1767 opts = to_f_uvc_opts(opts_item); \
1769 mutex_lock(&opts->lock); \
1771 mutex_unlock(&opts->lock); \
1782 struct f_uvc_opts *opts; \
1791 opts = to_f_uvc_opts(opts_item); \
1793 mutex_lock(&opts->lock); \
1794 if (u->fmt.linked || opts->refcnt) { \
1806 mutex_unlock(&opts->lock); \
1922 struct f_uvc_opts *opts; \
1930 opts = to_f_uvc_opts(opts_item); \
1932 mutex_lock(&opts->lock); \
1934 mutex_unlock(&opts->lock); \
1947 struct f_uvc_opts *opts; \
1955 opts = to_f_uvc_opts(opts_item); \
1957 mutex_lock(&opts->lock); \
1959 mutex_unlock(&opts->lock); \
1970 struct f_uvc_opts *opts; \
1979 opts = to_f_uvc_opts(opts_item); \
1981 mutex_lock(&opts->lock); \
1982 if (u->fmt.linked || opts->refcnt) { \
1998 mutex_unlock(&opts->lock); \
2019 struct f_uvc_opts *opts; in uvcg_framebased_guid_format_show() local
2026 opts = to_f_uvc_opts(opts_item); in uvcg_framebased_guid_format_show()
2028 mutex_lock(&opts->lock); in uvcg_framebased_guid_format_show()
2030 mutex_unlock(&opts->lock); in uvcg_framebased_guid_format_show()
2041 struct f_uvc_opts *opts; in uvcg_framebased_guid_format_store() local
2049 opts = to_f_uvc_opts(opts_item); in uvcg_framebased_guid_format_store()
2051 mutex_lock(&opts->lock); in uvcg_framebased_guid_format_store()
2052 if (ch->fmt.linked || opts->refcnt) { in uvcg_framebased_guid_format_store()
2062 mutex_unlock(&opts->lock); in uvcg_framebased_guid_format_store()
2160 struct f_uvc_opts *opts; \
2169 opts = to_f_uvc_opts(opts_item); \
2170 cd = &opts->uvc_color_matching; \
2172 mutex_lock(&opts->lock); \
2174 mutex_unlock(&opts->lock); \
2496 struct f_uvc_opts *opts; in uvcg_streaming_class_allow_link() local
2511 opts = to_f_uvc_opts(streaming->ci_parent); in uvcg_streaming_class_allow_link()
2513 mutex_lock(&opts->lock); in uvcg_streaming_class_allow_link()
2515 class_array = __uvcg_get_stream_class_arr(src, opts); in uvcg_streaming_class_allow_link()
2516 if (!class_array || *class_array || opts->refcnt) { in uvcg_streaming_class_allow_link()
2553 *cl_arr = (struct uvc_descriptor_header *)&opts->uvc_color_matching; in uvcg_streaming_class_allow_link()
2559 mutex_unlock(&opts->lock); in uvcg_streaming_class_allow_link()
2570 struct f_uvc_opts *opts; in uvcg_streaming_class_drop_link() local
2582 opts = to_f_uvc_opts(streaming->ci_parent); in uvcg_streaming_class_drop_link()
2584 mutex_lock(&opts->lock); in uvcg_streaming_class_drop_link()
2586 class_array = __uvcg_get_stream_class_arr(src, opts); in uvcg_streaming_class_drop_link()
2590 if (opts->refcnt) in uvcg_streaming_class_drop_link()
2600 mutex_unlock(&opts->lock); in uvcg_streaming_class_drop_link()
2662 struct f_uvc_opts *opts; in uvcg_default_streaming_b_interface_number_show() local
2668 opts = to_f_uvc_opts(opts_item); in uvcg_default_streaming_b_interface_number_show()
2670 mutex_lock(&opts->lock); in uvcg_default_streaming_b_interface_number_show()
2671 result += sprintf(page, "%u\n", opts->streaming_interface); in uvcg_default_streaming_b_interface_number_show()
2672 mutex_unlock(&opts->lock); in uvcg_default_streaming_b_interface_number_show()
2710 struct f_uvc_opts *opts = to_f_uvc_opts(item); in uvc_func_item_release() local
2713 usb_put_function_instance(&opts->func_inst); in uvc_func_item_release()
2724 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2727 mutex_lock(&opts->lock); \
2728 result = sprintf(page, "%u\n", opts->cname); \
2729 mutex_unlock(&opts->lock); \
2738 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2742 mutex_lock(&opts->lock); \
2743 if (opts->refcnt) { \
2756 opts->cname = num; \
2759 mutex_unlock(&opts->lock); \
2781 struct f_uvc_opts *opts = to_f_uvc_opts(item); in f_uvc_opts_device_name_show() local
2784 mutex_lock(&opts->lock); in f_uvc_opts_device_name_show()
2785 ret = sprintf(page, "%s\n", opts->device_name ?: ""); in f_uvc_opts_device_name_show()
2786 mutex_unlock(&opts->lock); in f_uvc_opts_device_name_show()
2794 struct f_uvc_opts *opts = to_f_uvc_opts(item); in f_uvc_opts_device_name_store() local
2802 mutex_lock(&opts->lock); in f_uvc_opts_device_name_store()
2803 if (opts->refcnt) { in f_uvc_opts_device_name_store()
2817 old_name = opts->device_name; in f_uvc_opts_device_name_store()
2818 opts->device_name = name; in f_uvc_opts_device_name_store()
2820 if (opts->device_name_allocated) in f_uvc_opts_device_name_store()
2823 opts->device_name_allocated = true; in f_uvc_opts_device_name_store()
2826 mutex_unlock(&opts->lock); in f_uvc_opts_device_name_store()
2837 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2840 mutex_lock(&opts->lock); \
2841 result = snprintf(page, sizeof(opts->aname), "%s", opts->aname);\
2842 mutex_unlock(&opts->lock); \
2850 struct f_uvc_opts *opts = to_f_uvc_opts(item); \
2851 int size = min(sizeof(opts->aname), len + 1); \
2854 mutex_lock(&opts->lock); \
2855 if (opts->refcnt) { \
2860 ret = strscpy(opts->aname, page, size); \
2865 mutex_unlock(&opts->lock); \
2904 int uvcg_attach_configfs(struct f_uvc_opts *opts) in uvcg_attach_configfs() argument
2908 config_group_init_type_name(&opts->func_inst.group, uvc_func_type.name, in uvcg_attach_configfs()
2911 ret = uvcg_config_create_children(&opts->func_inst.group, in uvcg_attach_configfs()
2914 config_group_put(&opts->func_inst.group); in uvcg_attach_configfs()