Lines Matching refs:ep_opts

2325 static int f_midi2_block_opts_create(struct f_midi2_ep_opts *ep_opts,  in f_midi2_block_opts_create()  argument
2332 mutex_lock(&ep_opts->opts->lock); in f_midi2_block_opts_create()
2333 if (ep_opts->opts->refcnt || ep_opts->blks[blk]) { in f_midi2_block_opts_create()
2344 block_opts->ep = ep_opts; in f_midi2_block_opts_create()
2354 ep_opts->blks[blk] = block_opts; in f_midi2_block_opts_create()
2358 mutex_unlock(&ep_opts->opts->lock); in f_midi2_block_opts_create()
2366 struct f_midi2_ep_opts *ep_opts; in f_midi2_opts_block_make() local
2377 ep_opts = to_f_midi2_ep_opts(&group->cg_item); in f_midi2_opts_block_make()
2381 if (ep_opts->blks[blk]) in f_midi2_opts_block_make()
2383 ret = f_midi2_block_opts_create(ep_opts, blk, &block_opts); in f_midi2_opts_block_make()
2498 struct f_midi2_ep_opts *ep_opts; in f_midi2_ep_opts_create() local
2500 ep_opts = kzalloc(sizeof(*ep_opts), GFP_KERNEL); in f_midi2_ep_opts_create()
2501 if (!ep_opts) in f_midi2_ep_opts_create()
2504 ep_opts->opts = opts; in f_midi2_ep_opts_create()
2505 ep_opts->index = index; in f_midi2_ep_opts_create()
2508 ep_opts->info.protocol = 2; in f_midi2_ep_opts_create()
2509 ep_opts->info.protocol_caps = 3; in f_midi2_ep_opts_create()
2511 opts->eps[index] = ep_opts; in f_midi2_ep_opts_create()
2512 *ep_p = ep_opts; in f_midi2_ep_opts_create()
2521 struct f_midi2_ep_opts *ep_opts; in f_midi2_opts_ep_make() local
2536 ret = f_midi2_ep_opts_create(opts, index, &ep_opts); in f_midi2_opts_ep_make()
2540 config_group_init_type_name(&ep_opts->group, name, &f_midi2_ep_type); in f_midi2_opts_ep_make()
2541 return &ep_opts->group; in f_midi2_opts_ep_make()
2548 struct f_midi2_ep_opts *ep_opts = to_f_midi2_ep_opts(item); in f_midi2_opts_ep_drop() local
2550 mutex_lock(&ep_opts->opts->lock); in f_midi2_opts_ep_drop()
2551 ep_opts->opts->eps[ep_opts->index] = NULL; in f_midi2_opts_ep_drop()
2552 mutex_unlock(&ep_opts->opts->lock); in f_midi2_opts_ep_drop()
2646 struct f_midi2_ep_opts *ep_opts; in f_midi2_alloc_inst() local
2662 ret = f_midi2_ep_opts_create(opts, 0, &ep_opts); in f_midi2_alloc_inst()
2669 ret = f_midi2_block_opts_create(ep_opts, 0, &block_opts); in f_midi2_alloc_inst()
2671 kfree(ep_opts); in f_midi2_alloc_inst()
2682 config_group_init_type_name(&ep_opts->group, "ep.0", in f_midi2_alloc_inst()
2684 configfs_add_default_group(&ep_opts->group, &opts->func_inst.group); in f_midi2_alloc_inst()
2688 configfs_add_default_group(&block_opts->group, &ep_opts->group); in f_midi2_alloc_inst()