Home
last modified time | relevance | path

Searched refs:opts (Results 1 – 25 of 79) sorted by relevance

1234

/drivers/usb/gadget/function/
Du_ether_configfs.h22 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
24 usb_put_function_instance(&opts->func_inst); \
35 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
38 mutex_lock(&opts->lock); \
39 result = gether_get_dev_addr(opts->net, page, PAGE_SIZE); \
40 mutex_unlock(&opts->lock); \
48 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
51 mutex_lock(&opts->lock); \
52 if (opts->refcnt) { \
53 mutex_unlock(&opts->lock); \
[all …]
Duvc_configfs.c58 struct f_uvc_opts *opts; \
66 opts = to_f_uvc_opts(opts_item); \
68 mutex_lock(&opts->lock); \
70 mutex_unlock(&opts->lock); \
81 struct f_uvc_opts *opts; \
90 opts = to_f_uvc_opts(opts_item); \
92 mutex_lock(&opts->lock); \
93 if (ch->linked || opts->refcnt) { \
109 mutex_unlock(&opts->lock); \
195 struct f_uvc_opts *opts; \
[all …]
Df_uvc.c585 struct f_uvc_opts *opts; in uvc_function_bind() local
590 opts = fi_to_f_uvc_opts(f->fi); in uvc_function_bind()
593 opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); in uvc_function_bind()
594 opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); in uvc_function_bind()
595 opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); in uvc_function_bind()
598 if (opts->streaming_maxburst && in uvc_function_bind()
599 (opts->streaming_maxpacket % 1024) != 0) { in uvc_function_bind()
600 opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); in uvc_function_bind()
602 opts->streaming_maxpacket); in uvc_function_bind()
611 if (opts->streaming_maxpacket <= 1024) { in uvc_function_bind()
[all …]
Df_uac1.c326 struct f_uac1_opts *opts; in f_audio_out_ep_complete() local
330 opts = container_of(audio->card.func.fi, struct f_uac1_opts, in f_audio_out_ep_complete()
332 audio_buf_size = opts->audio_buf_size; in f_audio_out_ep_complete()
578 struct f_uac1_opts *opts; in f_audio_set_alt() local
584 opts = container_of(f->fi, struct f_uac1_opts, func_inst); in f_audio_set_alt()
585 req_buf_size = opts->req_buf_size; in f_audio_set_alt()
586 req_count = opts->req_count; in f_audio_set_alt()
587 audio_buf_size = opts->audio_buf_size; in f_audio_set_alt()
775 struct f_uac1_opts *opts = to_f_uac1_opts(item); in f_uac1_attr_release() local
777 usb_put_function_instance(&opts->func_inst); in f_uac1_attr_release()
[all …]
Df_sourcesink.c454 struct f_ss_opts *opts; in sourcesink_free_func() local
456 opts = container_of(f->fi, struct f_ss_opts, func_inst); in sourcesink_free_func()
458 mutex_lock(&opts->lock); in sourcesink_free_func()
459 opts->refcnt--; in sourcesink_free_func()
460 mutex_unlock(&opts->lock); in sourcesink_free_func()
894 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_show() local
897 mutex_lock(&opts->lock); in f_ss_opts_pattern_show()
898 result = sprintf(page, "%u\n", opts->pattern); in f_ss_opts_pattern_show()
899 mutex_unlock(&opts->lock); in f_ss_opts_pattern_show()
907 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_store() local
[all …]
Df_hid.c795 struct f_hid_opts *opts = to_f_hid_opts(item); in hid_attr_release() local
797 usb_put_function_instance(&opts->func_inst); in hid_attr_release()
807 struct f_hid_opts *opts = to_f_hid_opts(item); \
810 mutex_lock(&opts->lock); \
811 result = sprintf(page, "%d\n", opts->name); \
812 mutex_unlock(&opts->lock); \
820 struct f_hid_opts *opts = to_f_hid_opts(item); \
824 mutex_lock(&opts->lock); \
825 if (opts->refcnt) { \
838 opts->name = num; \
[all …]
Df_midi.c1036 struct f_midi_opts *opts = to_f_midi_opts(item); in midi_attr_release() local
1038 usb_put_function_instance(&opts->func_inst); in midi_attr_release()
1048 struct f_midi_opts *opts = to_f_midi_opts(item); \
1051 mutex_lock(&opts->lock); \
1052 result = sprintf(page, "%d\n", opts->name); \
1053 mutex_unlock(&opts->lock); \
1061 struct f_midi_opts *opts = to_f_midi_opts(item); \
1065 mutex_lock(&opts->lock); \
1066 if (opts->refcnt) { \
1079 opts->name = num; \
[all …]
Df_subset.c423 struct f_gether_opts *opts; in geth_free_inst() local
425 opts = container_of(f, struct f_gether_opts, func_inst); in geth_free_inst()
426 if (opts->bound) in geth_free_inst()
427 gether_cleanup(netdev_priv(opts->net)); in geth_free_inst()
429 free_netdev(opts->net); in geth_free_inst()
430 kfree(opts); in geth_free_inst()
435 struct f_gether_opts *opts; in geth_alloc_inst() local
437 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in geth_alloc_inst()
438 if (!opts) in geth_alloc_inst()
440 mutex_init(&opts->lock); in geth_alloc_inst()
[all …]
Df_rndis.c836 struct f_rndis_opts *opts; in rndis_borrow_net() local
838 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_borrow_net()
839 if (opts->bound) in rndis_borrow_net()
840 gether_cleanup(netdev_priv(opts->net)); in rndis_borrow_net()
842 free_netdev(opts->net); in rndis_borrow_net()
843 opts->borrowed_net = opts->bound = true; in rndis_borrow_net()
844 opts->net = net; in rndis_borrow_net()
885 struct f_rndis_opts *opts; in rndis_free_inst() local
887 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_free_inst()
888 if (!opts->borrowed_net) { in rndis_free_inst()
[all …]
Df_ncm.c970 const struct ndp_parser_opts *opts = ncm->parser_opts; in package_for_tx() local
972 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in package_for_tx()
986 put_ncm(&ntb_iter, opts->block_length, new_len); in package_for_tx()
987 put_ncm(&ntb_iter, opts->ndp_index, ndp_index); in package_for_tx()
990 new_len = opts->ndp_size + in package_for_tx()
1033 const struct ndp_parser_opts *opts = ncm->parser_opts; in ncm_wrap_ntb() local
1037 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in ncm_wrap_ntb()
1072 ncb_len = opts->nth_size; in ncm_wrap_ntb()
1084 put_unaligned_le32(opts->nth_sign, ntb_data); in ncm_wrap_ntb()
1087 put_unaligned_le16(opts->nth_size, ntb_data++); in ncm_wrap_ntb()
[all …]
Df_eem.c567 struct f_eem_opts *opts; in eem_free_inst() local
569 opts = container_of(f, struct f_eem_opts, func_inst); in eem_free_inst()
570 if (opts->bound) in eem_free_inst()
571 gether_cleanup(netdev_priv(opts->net)); in eem_free_inst()
573 free_netdev(opts->net); in eem_free_inst()
574 kfree(opts); in eem_free_inst()
579 struct f_eem_opts *opts; in eem_alloc_inst() local
581 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in eem_alloc_inst()
582 if (!opts) in eem_alloc_inst()
584 mutex_init(&opts->lock); in eem_alloc_inst()
[all …]
Df_printer.c1147 struct f_printer_opts *opts = to_f_printer_opts(item); in printer_attr_release() local
1149 usb_put_function_instance(&opts->func_inst); in printer_attr_release()
1159 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_show() local
1162 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_show()
1163 result = strlcpy(page, opts->pnp_string + 2, PNP_STRING_LEN - 2); in f_printer_opts_pnp_string_show()
1164 mutex_unlock(&opts->lock); in f_printer_opts_pnp_string_show()
1172 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_store() local
1175 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_store()
1176 result = strlcpy(opts->pnp_string + 2, page, PNP_STRING_LEN - 2); in f_printer_opts_pnp_string_store()
1177 l = strlen(opts->pnp_string + 2) + 2; in f_printer_opts_pnp_string_store()
[all …]
Df_serial.c263 struct f_serial_opts *opts = to_f_serial_opts(item); in serial_attr_release() local
265 usb_put_function_instance(&opts->func_inst); in serial_attr_release()
292 struct f_serial_opts *opts; in gser_free_inst() local
294 opts = container_of(f, struct f_serial_opts, func_inst); in gser_free_inst()
295 gserial_free_line(opts->port_num); in gser_free_inst()
296 kfree(opts); in gser_free_inst()
301 struct f_serial_opts *opts; in gser_alloc_inst() local
304 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in gser_alloc_inst()
305 if (!opts) in gser_alloc_inst()
308 opts->func_inst.free_func_inst = gser_free_inst; in gser_alloc_inst()
[all …]
Df_uac2.c366 struct f_uac2_opts *opts; in uac2_pcm_open() local
372 opts = container_of(audio_dev->func.fi, struct f_uac2_opts, func_inst); in uac2_pcm_open()
373 p_ssize = opts->p_ssize; in uac2_pcm_open()
374 c_ssize = opts->c_ssize; in uac2_pcm_open()
375 p_srate = opts->p_srate; in uac2_pcm_open()
376 c_srate = opts->c_srate; in uac2_pcm_open()
377 p_chmask = opts->p_chmask; in uac2_pcm_open()
378 c_chmask = opts->c_chmask; in uac2_pcm_open()
450 struct f_uac2_opts *opts; in snd_uac2_probe() local
455 opts = container_of(audio_dev->func.fi, struct f_uac2_opts, func_inst); in snd_uac2_probe()
[all …]
Df_loopback.c227 struct f_lb_opts *opts; in lb_free_func() local
229 opts = container_of(f->fi, struct f_lb_opts, func_inst); in lb_free_func()
231 mutex_lock(&opts->lock); in lb_free_func()
232 opts->refcnt--; in lb_free_func()
233 mutex_unlock(&opts->lock); in lb_free_func()
479 struct f_lb_opts *opts = to_f_lb_opts(item); in f_lb_opts_qlen_show() local
482 mutex_lock(&opts->lock); in f_lb_opts_qlen_show()
483 result = sprintf(page, "%d\n", opts->qlen); in f_lb_opts_qlen_show()
484 mutex_unlock(&opts->lock); in f_lb_opts_qlen_show()
492 struct f_lb_opts *opts = to_f_lb_opts(item); in f_lb_opts_qlen_store() local
[all …]
Df_ecm.c856 struct f_ecm_opts *opts; in ecm_free_inst() local
858 opts = container_of(f, struct f_ecm_opts, func_inst); in ecm_free_inst()
859 if (opts->bound) in ecm_free_inst()
860 gether_cleanup(netdev_priv(opts->net)); in ecm_free_inst()
862 free_netdev(opts->net); in ecm_free_inst()
863 kfree(opts); in ecm_free_inst()
868 struct f_ecm_opts *opts; in ecm_alloc_inst() local
870 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in ecm_alloc_inst()
871 if (!opts) in ecm_alloc_inst()
873 mutex_init(&opts->lock); in ecm_alloc_inst()
[all …]
Df_obex.c393 struct f_serial_opts *opts = to_f_serial_opts(item); in obex_attr_release() local
395 usb_put_function_instance(&opts->func_inst); in obex_attr_release()
422 struct f_serial_opts *opts; in obex_free_inst() local
424 opts = container_of(f, struct f_serial_opts, func_inst); in obex_free_inst()
425 gserial_free_line(opts->port_num); in obex_free_inst()
426 kfree(opts); in obex_free_inst()
431 struct f_serial_opts *opts; in obex_alloc_inst() local
434 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in obex_alloc_inst()
435 if (!opts) in obex_alloc_inst()
438 opts->func_inst.free_func_inst = obex_free_inst; in obex_alloc_inst()
[all …]
Df_mass_storage.c3000 struct fsg_opts *opts; in fsg_bind() local
3009 opts = fsg_opts_from_func_inst(f->fi); in fsg_bind()
3010 if (!opts->no_configfs) { in fsg_bind()
3132 struct fsg_lun_opts *opts = to_fsg_lun_opts(item); in fsg_lun_opts_file_show() local
3133 struct fsg_opts *fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); in fsg_lun_opts_file_show()
3135 return fsg_show_file(opts->lun, &fsg_opts->common->filesem, page); in fsg_lun_opts_file_show()
3141 struct fsg_lun_opts *opts = to_fsg_lun_opts(item); in fsg_lun_opts_file_store() local
3142 struct fsg_opts *fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); in fsg_lun_opts_file_store()
3144 return fsg_store_file(opts->lun, &fsg_opts->common->filesem, page, len); in fsg_lun_opts_file_store()
3157 struct fsg_lun_opts *opts = to_fsg_lun_opts(item); in fsg_lun_opts_ro_store() local
[all …]
Df_phonet.c588 struct f_phonet_opts *opts = to_f_phonet_opts(item); in phonet_attr_release() local
590 usb_put_function_instance(&opts->func_inst); in phonet_attr_release()
617 struct f_phonet_opts *opts; in phonet_free_inst() local
619 opts = container_of(f, struct f_phonet_opts, func_inst); in phonet_free_inst()
620 if (opts->bound) in phonet_free_inst()
621 gphonet_cleanup(opts->net); in phonet_free_inst()
623 free_netdev(opts->net); in phonet_free_inst()
624 kfree(opts); in phonet_free_inst()
629 struct f_phonet_opts *opts; in phonet_alloc_inst() local
631 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in phonet_alloc_inst()
[all …]
/drivers/nvme/host/
Dfabrics.c116 if (ctrl->opts->mask & NVMF_OPT_TRADDR) in nvmf_get_address()
117 len += snprintf(buf, size, "traddr=%s", ctrl->opts->traddr); in nvmf_get_address()
118 if (ctrl->opts->mask & NVMF_OPT_TRSVCID) in nvmf_get_address()
120 (len) ? "," : "", ctrl->opts->trsvcid); in nvmf_get_address()
121 if (ctrl->opts->mask & NVMF_OPT_HOST_TRADDR) in nvmf_get_address()
123 (len) ? "," : "", ctrl->opts->host_traddr); in nvmf_get_address()
136 return ctrl->opts->subsysnqn; in nvmf_get_subsysnqn()
391 cmd.connect.kato = ctrl->opts->discovery_nqn ? 0 : in nvmf_connect_admin_queue()
398 memcpy(&data->hostid, &ctrl->opts->host->id, sizeof(uuid_be)); in nvmf_connect_admin_queue()
400 strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); in nvmf_connect_admin_queue()
[all …]
/drivers/net/ppp/
Dppp_mppe.h33 #define MPPE_OPTS_TO_CI(opts, ci) \ argument
38 if (opts & MPPE_OPT_STATEFUL) \
47 if (opts & MPPE_OPT_128) \
49 if (opts & MPPE_OPT_40) \
55 #define MPPE_CI_TO_OPTS(ci, opts) \ argument
59 opts = 0; \
63 opts |= MPPE_OPT_STATEFUL; \
67 opts |= MPPE_OPT_128; \
69 opts |= MPPE_OPT_40; \
73 opts |= MPPE_OPT_56; \
[all …]
/drivers/usb/gadget/legacy/
Dmass_storage.c112 struct fsg_opts *opts; in msg_do_config() local
120 opts = fsg_opts_from_func_inst(fi_msg); in msg_do_config()
148 struct fsg_opts *opts; in msg_bind() local
157 opts = fsg_opts_from_func_inst(fi_msg); in msg_bind()
159 opts->no_configfs = true; in msg_bind()
160 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in msg_bind()
164 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in msg_bind()
168 fsg_common_set_sysfs(opts->common, true); in msg_bind()
169 status = fsg_common_create_luns(opts->common, &config); in msg_bind()
173 fsg_common_set_inquiry_string(opts->common, config.vendor_name, in msg_bind()
[all …]
Dacm_ms.c112 struct fsg_opts *opts; in acm_ms_do_config() local
120 opts = fsg_opts_from_func_inst(fi_msg); in acm_ms_do_config()
162 struct fsg_opts *opts; in acm_ms_bind() local
178 opts = fsg_opts_from_func_inst(fi_msg); in acm_ms_bind()
180 opts->no_configfs = true; in acm_ms_bind()
181 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in acm_ms_bind()
185 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in acm_ms_bind()
189 fsg_common_set_sysfs(opts->common, true); in acm_ms_bind()
190 status = fsg_common_create_luns(opts->common, &config); in acm_ms_bind()
194 fsg_common_set_inquiry_string(opts->common, config.vendor_name, in acm_ms_bind()
[all …]
/drivers/staging/vt6655/
Ddevice_main.c171 struct vnt_options *opts = &priv->opts; in device_get_options() local
173 opts->rx_descs0 = RX_DESC_DEF0; in device_get_options()
174 opts->rx_descs1 = RX_DESC_DEF1; in device_get_options()
175 opts->tx_descs[0] = TX_DESC_DEF0; in device_get_options()
176 opts->tx_descs[1] = TX_DESC_DEF1; in device_get_options()
177 opts->int_works = INT_WORKS_DEF; in device_get_options()
179 opts->short_retry = SHORT_RETRY_DEF; in device_get_options()
180 opts->long_retry = LONG_RETRY_DEF; in device_get_options()
181 opts->bbp_type = BBP_TYPE_DEF; in device_get_options()
187 priv->byShortRetryLimit = priv->opts.short_retry; in device_set_options()
[all …]
/drivers/acpi/
Dspcr.c34 static char opts[64]; in parse_spcr() local
98 snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype, in parse_spcr()
101 pr_info("console: %s\n", opts); in parse_spcr()
104 setup_earlycon(opts); in parse_spcr()
106 err = add_preferred_console(uart, 0, opts + strlen(uart) + 1); in parse_spcr()

1234