Lines Matching refs:ep_opts

2321 static int f_midi2_block_opts_create(struct f_midi2_ep_opts *ep_opts,  in f_midi2_block_opts_create()  argument
2328 mutex_lock(&ep_opts->opts->lock); in f_midi2_block_opts_create()
2329 if (ep_opts->opts->refcnt || ep_opts->blks[blk]) { in f_midi2_block_opts_create()
2340 block_opts->ep = ep_opts; in f_midi2_block_opts_create()
2350 ep_opts->blks[blk] = block_opts; in f_midi2_block_opts_create()
2354 mutex_unlock(&ep_opts->opts->lock); in f_midi2_block_opts_create()
2362 struct f_midi2_ep_opts *ep_opts; in f_midi2_opts_block_make() local
2373 ep_opts = to_f_midi2_ep_opts(&group->cg_item); in f_midi2_opts_block_make()
2377 if (ep_opts->blks[blk]) in f_midi2_opts_block_make()
2379 ret = f_midi2_block_opts_create(ep_opts, blk, &block_opts); in f_midi2_opts_block_make()
2494 struct f_midi2_ep_opts *ep_opts; in f_midi2_ep_opts_create() local
2496 ep_opts = kzalloc(sizeof(*ep_opts), GFP_KERNEL); in f_midi2_ep_opts_create()
2497 if (!ep_opts) in f_midi2_ep_opts_create()
2500 ep_opts->opts = opts; in f_midi2_ep_opts_create()
2501 ep_opts->index = index; in f_midi2_ep_opts_create()
2504 ep_opts->info.protocol = 2; in f_midi2_ep_opts_create()
2505 ep_opts->info.protocol_caps = 3; in f_midi2_ep_opts_create()
2507 opts->eps[index] = ep_opts; in f_midi2_ep_opts_create()
2508 *ep_p = ep_opts; in f_midi2_ep_opts_create()
2517 struct f_midi2_ep_opts *ep_opts; in f_midi2_opts_ep_make() local
2532 ret = f_midi2_ep_opts_create(opts, index, &ep_opts); in f_midi2_opts_ep_make()
2536 config_group_init_type_name(&ep_opts->group, name, &f_midi2_ep_type); in f_midi2_opts_ep_make()
2537 return &ep_opts->group; in f_midi2_opts_ep_make()
2544 struct f_midi2_ep_opts *ep_opts = to_f_midi2_ep_opts(item); in f_midi2_opts_ep_drop() local
2546 mutex_lock(&ep_opts->opts->lock); in f_midi2_opts_ep_drop()
2547 ep_opts->opts->eps[ep_opts->index] = NULL; in f_midi2_opts_ep_drop()
2548 mutex_unlock(&ep_opts->opts->lock); in f_midi2_opts_ep_drop()
2642 struct f_midi2_ep_opts *ep_opts; in f_midi2_alloc_inst() local
2658 ret = f_midi2_ep_opts_create(opts, 0, &ep_opts); in f_midi2_alloc_inst()
2665 ret = f_midi2_block_opts_create(ep_opts, 0, &block_opts); in f_midi2_alloc_inst()
2667 kfree(ep_opts); in f_midi2_alloc_inst()
2678 config_group_init_type_name(&ep_opts->group, "ep.0", in f_midi2_alloc_inst()
2680 configfs_add_default_group(&ep_opts->group, &opts->func_inst.group); in f_midi2_alloc_inst()
2684 configfs_add_default_group(&block_opts->group, &ep_opts->group); in f_midi2_alloc_inst()