Home
last modified time | relevance | path

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

123

/drivers/usb/gadget/function/
Du_ether_configfs.h25 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
27 usb_put_function_instance(&opts->func_inst); \
37 static ssize_t _f_##_opts_dev_addr_show(struct f_##_f_##_opts *opts, \
42 mutex_lock(&opts->lock); \
43 result = gether_get_dev_addr(opts->net, page, PAGE_SIZE); \
44 mutex_unlock(&opts->lock); \
49 static ssize_t _f_##_opts_dev_addr_store(struct f_##_f_##_opts *opts, \
54 mutex_lock(&opts->lock); \
55 if (opts->refcnt) { \
56 mutex_unlock(&opts->lock); \
[all …]
Df_sourcesink.c686 struct f_ss_opts *opts; in sourcesink_free_func() local
688 opts = container_of(f->fi, struct f_ss_opts, func_inst); in sourcesink_free_func()
690 mutex_lock(&opts->lock); in sourcesink_free_func()
691 opts->refcnt--; in sourcesink_free_func()
692 mutex_unlock(&opts->lock); in sourcesink_free_func()
1212 static ssize_t f_ss_opts_pattern_show(struct f_ss_opts *opts, char *page) in f_ss_opts_pattern_show() argument
1216 mutex_lock(&opts->lock); in f_ss_opts_pattern_show()
1217 result = sprintf(page, "%d", opts->pattern); in f_ss_opts_pattern_show()
1218 mutex_unlock(&opts->lock); in f_ss_opts_pattern_show()
1223 static ssize_t f_ss_opts_pattern_store(struct f_ss_opts *opts, in f_ss_opts_pattern_store() argument
[all …]
Df_uac1.c322 struct f_uac1_opts *opts; in f_audio_out_ep_complete() local
326 opts = container_of(audio->card.func.fi, struct f_uac1_opts, in f_audio_out_ep_complete()
328 audio_buf_size = opts->audio_buf_size; in f_audio_out_ep_complete()
574 struct f_uac1_opts *opts; in f_audio_set_alt() local
580 opts = container_of(f->fi, struct f_uac1_opts, func_inst); in f_audio_set_alt()
581 req_buf_size = opts->req_buf_size; in f_audio_set_alt()
582 req_count = opts->req_count; in f_audio_set_alt()
583 audio_buf_size = opts->audio_buf_size; in f_audio_set_alt()
774 struct f_uac1_opts *opts = to_f_uac1_opts(item); in f_uac1_attr_release() local
776 usb_put_function_instance(&opts->func_inst); in f_uac1_attr_release()
[all …]
Df_midi.c916 struct f_midi_opts *opts = to_f_midi_opts(item); in midi_attr_release() local
918 usb_put_function_instance(&opts->func_inst); in midi_attr_release()
928 static ssize_t f_midi_opts_##name##_show(struct f_midi_opts *opts, char *page) \
932 mutex_lock(&opts->lock); \
933 result = sprintf(page, "%d\n", opts->name); \
934 mutex_unlock(&opts->lock); \
939 static ssize_t f_midi_opts_##name##_store(struct f_midi_opts *opts, \
945 mutex_lock(&opts->lock); \
946 if (opts->refcnt) { \
959 opts->name = num; \
[all …]
Df_subset.c431 struct f_gether_opts *opts; in geth_free_inst() local
433 opts = container_of(f, struct f_gether_opts, func_inst); in geth_free_inst()
434 if (opts->bound) in geth_free_inst()
435 gether_cleanup(netdev_priv(opts->net)); in geth_free_inst()
437 free_netdev(opts->net); in geth_free_inst()
438 kfree(opts); in geth_free_inst()
443 struct f_gether_opts *opts; in geth_alloc_inst() local
445 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in geth_alloc_inst()
446 if (!opts) in geth_alloc_inst()
448 mutex_init(&opts->lock); in geth_alloc_inst()
[all …]
Df_rndis.c875 struct f_rndis_opts *opts; in rndis_borrow_net() local
877 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_borrow_net()
878 if (opts->bound) in rndis_borrow_net()
879 gether_cleanup(netdev_priv(opts->net)); in rndis_borrow_net()
881 free_netdev(opts->net); in rndis_borrow_net()
882 opts->borrowed_net = opts->bound = true; in rndis_borrow_net()
883 opts->net = net; in rndis_borrow_net()
924 struct f_rndis_opts *opts; in rndis_free_inst() local
926 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_free_inst()
927 if (!opts->borrowed_net) { in rndis_free_inst()
[all …]
Df_serial.c275 struct f_serial_opts *opts = to_f_serial_opts(item); in f_serial_attr_show() local
281 ret = f_serial_opts_attr->show(opts, page); in f_serial_attr_show()
288 struct f_serial_opts *opts = to_f_serial_opts(item); in serial_attr_release() local
290 usb_put_function_instance(&opts->func_inst); in serial_attr_release()
298 static ssize_t f_serial_port_num_show(struct f_serial_opts *opts, char *page) in f_serial_port_num_show() argument
300 return sprintf(page, "%u\n", opts->port_num); in f_serial_port_num_show()
319 struct f_serial_opts *opts; in gser_free_inst() local
321 opts = container_of(f, struct f_serial_opts, func_inst); in gser_free_inst()
322 gserial_free_line(opts->port_num); in gser_free_inst()
323 kfree(opts); in gser_free_inst()
[all …]
Df_ncm.c900 const struct ndp_parser_opts *opts = ncm->parser_opts; in package_for_tx() local
902 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in package_for_tx()
916 put_ncm(&ntb_iter, opts->block_length, new_len); in package_for_tx()
917 put_ncm(&ntb_iter, opts->ndp_index, ndp_index); in package_for_tx()
920 new_len = opts->ndp_size + in package_for_tx()
963 const struct ndp_parser_opts *opts = ncm->parser_opts; in ncm_wrap_ntb() local
967 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in ncm_wrap_ntb()
1002 ncb_len = opts->nth_size; in ncm_wrap_ntb()
1014 put_unaligned_le32(opts->nth_sign, ntb_data); in ncm_wrap_ntb()
1017 put_unaligned_le16(opts->nth_size, ntb_data++); in ncm_wrap_ntb()
[all …]
Df_uvc.c603 struct f_uvc_opts *opts; in uvc_function_bind() local
608 opts = to_f_uvc_opts(f->fi); in uvc_function_bind()
611 opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); in uvc_function_bind()
612 opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); in uvc_function_bind()
613 opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); in uvc_function_bind()
616 if (opts->streaming_maxburst && in uvc_function_bind()
617 (opts->streaming_maxpacket % 1024) != 0) { in uvc_function_bind()
618 opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); in uvc_function_bind()
620 opts->streaming_maxpacket); in uvc_function_bind()
629 if (opts->streaming_maxpacket <= 1024) { in uvc_function_bind()
[all …]
Df_eem.c573 struct f_eem_opts *opts; in eem_free_inst() local
575 opts = container_of(f, struct f_eem_opts, func_inst); in eem_free_inst()
576 if (opts->bound) in eem_free_inst()
577 gether_cleanup(netdev_priv(opts->net)); in eem_free_inst()
579 free_netdev(opts->net); in eem_free_inst()
580 kfree(opts); in eem_free_inst()
585 struct f_eem_opts *opts; in eem_alloc_inst() local
587 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in eem_alloc_inst()
588 if (!opts) in eem_alloc_inst()
590 mutex_init(&opts->lock); in eem_alloc_inst()
[all …]
Df_loopback.c234 struct f_lb_opts *opts; in lb_free_func() local
236 opts = container_of(f->fi, struct f_lb_opts, func_inst); in lb_free_func()
238 mutex_lock(&opts->lock); in lb_free_func()
239 opts->refcnt--; in lb_free_func()
240 mutex_unlock(&opts->lock); in lb_free_func()
438 static ssize_t f_lb_opts_qlen_show(struct f_lb_opts *opts, char *page) in f_lb_opts_qlen_show() argument
442 mutex_lock(&opts->lock); in f_lb_opts_qlen_show()
443 result = sprintf(page, "%d", opts->qlen); in f_lb_opts_qlen_show()
444 mutex_unlock(&opts->lock); in f_lb_opts_qlen_show()
449 static ssize_t f_lb_opts_qlen_store(struct f_lb_opts *opts, in f_lb_opts_qlen_store() argument
[all …]
Df_obex.c422 struct f_serial_opts *opts = to_f_serial_opts(item); in f_obex_attr_show() local
428 ret = f_serial_opts_attr->show(opts, page); in f_obex_attr_show()
435 struct f_serial_opts *opts = to_f_serial_opts(item); in obex_attr_release() local
437 usb_put_function_instance(&opts->func_inst); in obex_attr_release()
445 static ssize_t f_obex_port_num_show(struct f_serial_opts *opts, char *page) in f_obex_port_num_show() argument
447 return sprintf(page, "%u\n", opts->port_num); in f_obex_port_num_show()
466 struct f_serial_opts *opts; in obex_free_inst() local
468 opts = container_of(f, struct f_serial_opts, func_inst); in obex_free_inst()
469 gserial_free_line(opts->port_num); in obex_free_inst()
470 kfree(opts); in obex_free_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_ecm.c873 struct f_ecm_opts *opts; in ecm_free_inst() local
875 opts = container_of(f, struct f_ecm_opts, func_inst); in ecm_free_inst()
876 if (opts->bound) in ecm_free_inst()
877 gether_cleanup(netdev_priv(opts->net)); in ecm_free_inst()
879 free_netdev(opts->net); in ecm_free_inst()
880 kfree(opts); in ecm_free_inst()
885 struct f_ecm_opts *opts; in ecm_alloc_inst() local
887 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in ecm_alloc_inst()
888 if (!opts) in ecm_alloc_inst()
890 mutex_init(&opts->lock); in ecm_alloc_inst()
[all …]
Df_mass_storage.c3116 struct fsg_opts *opts; in fsg_bind() local
3118 opts = fsg_opts_from_func_inst(f->fi); in fsg_bind()
3119 if (!opts->no_configfs) { in fsg_bind()
3227 static ssize_t fsg_lun_opts_file_show(struct fsg_lun_opts *opts, char *page) in fsg_lun_opts_file_show() argument
3231 fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); in fsg_lun_opts_file_show()
3233 return fsg_show_file(opts->lun, &fsg_opts->common->filesem, page); in fsg_lun_opts_file_show()
3236 static ssize_t fsg_lun_opts_file_store(struct fsg_lun_opts *opts, in fsg_lun_opts_file_store() argument
3241 fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent); in fsg_lun_opts_file_store()
3243 return fsg_store_file(opts->lun, &fsg_opts->common->filesem, page, len); in fsg_lun_opts_file_store()
3250 static ssize_t fsg_lun_opts_ro_show(struct fsg_lun_opts *opts, char *page) in fsg_lun_opts_ro_show() argument
[all …]
Df_phonet.c594 struct f_phonet_opts *opts = to_f_phonet_opts(item); in f_phonet_attr_show() local
600 ret = f_phonet_opts_attr->show(opts, page); in f_phonet_attr_show()
606 struct f_phonet_opts *opts = to_f_phonet_opts(item); in phonet_attr_release() local
608 usb_put_function_instance(&opts->func_inst); in phonet_attr_release()
616 static ssize_t f_phonet_ifname_show(struct f_phonet_opts *opts, char *page) in f_phonet_ifname_show() argument
618 return gether_get_ifname(opts->net, page, PAGE_SIZE); in f_phonet_ifname_show()
637 struct f_phonet_opts *opts; in phonet_free_inst() local
639 opts = container_of(f, struct f_phonet_opts, func_inst); in phonet_free_inst()
640 if (opts->bound) in phonet_free_inst()
641 gphonet_cleanup(opts->net); in phonet_free_inst()
[all …]
Df_acm.c747 struct f_serial_opts *opts; in acm_alloc_func() local
768 opts = container_of(fi, struct f_serial_opts, func_inst); in acm_alloc_func()
769 acm->port_num = opts->port_num; in acm_alloc_func()
787 struct f_serial_opts *opts = to_f_serial_opts(item); in f_acm_attr_show() local
793 ret = f_serial_opts_attr->show(opts, page); in f_acm_attr_show()
799 struct f_serial_opts *opts = to_f_serial_opts(item); in acm_attr_release() local
801 usb_put_function_instance(&opts->func_inst); in acm_attr_release()
809 static ssize_t f_acm_port_num_show(struct f_serial_opts *opts, char *page) in f_acm_port_num_show() argument
811 return sprintf(page, "%u\n", opts->port_num); in f_acm_port_num_show()
831 struct f_serial_opts *opts; in acm_free_instance() local
[all …]
Df_fs.c1220 static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts) in ffs_fs_parse_opts() argument
1224 if (!opts || !*opts) in ffs_fs_parse_opts()
1232 comma = strchr(opts, ','); in ffs_fs_parse_opts()
1237 eq = strchr(opts, '='); in ffs_fs_parse_opts()
1239 pr_err("'=' missing in %s\n", opts); in ffs_fs_parse_opts()
1246 pr_err("%s: invalid value: %s\n", opts, eq + 1); in ffs_fs_parse_opts()
1251 switch (eq - opts) { in ffs_fs_parse_opts()
1253 if (!memcmp(opts, "rmode", 5)) in ffs_fs_parse_opts()
1255 else if (!memcmp(opts, "fmode", 5)) in ffs_fs_parse_opts()
1262 if (!memcmp(opts, "mode", 4)) { in ffs_fs_parse_opts()
[all …]
Du_uac1.c208 struct f_uac1_opts *opts; in gaudio_open_snd_dev() local
211 opts = container_of(card->func.fi, struct f_uac1_opts, func_inst); in gaudio_open_snd_dev()
212 fn_play = opts->fn_play; in gaudio_open_snd_dev()
213 fn_cap = opts->fn_cap; in gaudio_open_snd_dev()
214 fn_cntl = opts->fn_cntl; in gaudio_open_snd_dev()
/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.c135 struct fsg_opts *opts; in msg_do_config() local
143 opts = fsg_opts_from_func_inst(fi_msg); in msg_do_config()
149 ret = fsg_common_run_thread(opts->common); in msg_do_config()
178 struct fsg_opts *opts; in msg_bind() local
187 opts = fsg_opts_from_func_inst(fi_msg); in msg_bind()
189 opts->no_configfs = true; in msg_bind()
190 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in msg_bind()
194 status = fsg_common_set_nluns(opts->common, config.nluns); in msg_bind()
198 fsg_common_set_ops(opts->common, &ops); in msg_bind()
200 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in msg_bind()
[all …]
Dacm_ms.c126 struct fsg_opts *opts; in acm_ms_do_config() local
134 opts = fsg_opts_from_func_inst(fi_msg); in acm_ms_do_config()
150 status = fsg_common_run_thread(opts->common); in acm_ms_do_config()
180 struct fsg_opts *opts; in acm_ms_bind() local
196 opts = fsg_opts_from_func_inst(fi_msg); in acm_ms_bind()
198 opts->no_configfs = true; in acm_ms_bind()
199 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in acm_ms_bind()
203 status = fsg_common_set_nluns(opts->common, config.nluns); in acm_ms_bind()
207 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in acm_ms_bind()
211 fsg_common_set_sysfs(opts->common, true); in acm_ms_bind()
[all …]
Dg_ffs.c195 struct f_fs_opts *opts; in gfs_init() local
230 opts = to_f_fs_opts(fi_ffs[i]); in gfs_init()
232 ret = ffs_single_dev(opts->dev); in gfs_init()
234 ret = ffs_name_dev(opts->dev, func_names[i]); in gfs_init()
237 opts->dev->ffs_ready_callback = functionfs_ready_callback; in gfs_init()
238 opts->dev->ffs_closed_callback = functionfs_closed_callback; in gfs_init()
239 opts->dev->ffs_acquire_dev_callback = functionfs_acquire_dev; in gfs_init()
240 opts->dev->ffs_release_dev_callback = functionfs_release_dev; in gfs_init()
241 opts->no_configfs = true; in gfs_init()
/drivers/scsi/aic7xxx/
DMakefile53 aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
59 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
70 aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
76 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
/drivers/sbus/char/
Ddisplay7seg.c173 struct device_node *opts; in d7s_probe() local
203 opts = of_find_node_by_path("/options"); in d7s_probe()
204 if (opts && in d7s_probe()
205 of_get_property(opts, "d7s-flipped?", NULL)) in d7s_probe()

123