Lines Matching refs:ep_opts

2323 static int f_midi2_block_opts_create(struct f_midi2_ep_opts *ep_opts,  in f_midi2_block_opts_create()  argument
2330 mutex_lock(&ep_opts->opts->lock); in f_midi2_block_opts_create()
2331 if (ep_opts->opts->refcnt || ep_opts->blks[blk]) { in f_midi2_block_opts_create()
2342 block_opts->ep = ep_opts; in f_midi2_block_opts_create()
2352 ep_opts->blks[blk] = block_opts; in f_midi2_block_opts_create()
2356 mutex_unlock(&ep_opts->opts->lock); in f_midi2_block_opts_create()
2364 struct f_midi2_ep_opts *ep_opts; in f_midi2_opts_block_make() local
2375 ep_opts = to_f_midi2_ep_opts(&group->cg_item); in f_midi2_opts_block_make()
2379 if (ep_opts->blks[blk]) in f_midi2_opts_block_make()
2381 ret = f_midi2_block_opts_create(ep_opts, blk, &block_opts); in f_midi2_opts_block_make()
2496 struct f_midi2_ep_opts *ep_opts; in f_midi2_ep_opts_create() local
2498 ep_opts = kzalloc(sizeof(*ep_opts), GFP_KERNEL); in f_midi2_ep_opts_create()
2499 if (!ep_opts) in f_midi2_ep_opts_create()
2502 ep_opts->opts = opts; in f_midi2_ep_opts_create()
2503 ep_opts->index = index; in f_midi2_ep_opts_create()
2506 ep_opts->info.protocol = 2; in f_midi2_ep_opts_create()
2507 ep_opts->info.protocol_caps = 3; in f_midi2_ep_opts_create()
2509 opts->eps[index] = ep_opts; in f_midi2_ep_opts_create()
2510 *ep_p = ep_opts; in f_midi2_ep_opts_create()
2519 struct f_midi2_ep_opts *ep_opts; in f_midi2_opts_ep_make() local
2534 ret = f_midi2_ep_opts_create(opts, index, &ep_opts); in f_midi2_opts_ep_make()
2538 config_group_init_type_name(&ep_opts->group, name, &f_midi2_ep_type); in f_midi2_opts_ep_make()
2539 return &ep_opts->group; in f_midi2_opts_ep_make()
2546 struct f_midi2_ep_opts *ep_opts = to_f_midi2_ep_opts(item); in f_midi2_opts_ep_drop() local
2548 mutex_lock(&ep_opts->opts->lock); in f_midi2_opts_ep_drop()
2549 ep_opts->opts->eps[ep_opts->index] = NULL; in f_midi2_opts_ep_drop()
2550 mutex_unlock(&ep_opts->opts->lock); in f_midi2_opts_ep_drop()
2644 struct f_midi2_ep_opts *ep_opts; in f_midi2_alloc_inst() local
2660 ret = f_midi2_ep_opts_create(opts, 0, &ep_opts); in f_midi2_alloc_inst()
2667 ret = f_midi2_block_opts_create(ep_opts, 0, &block_opts); in f_midi2_alloc_inst()
2669 kfree(ep_opts); in f_midi2_alloc_inst()
2680 config_group_init_type_name(&ep_opts->group, "ep.0", in f_midi2_alloc_inst()
2682 configfs_add_default_group(&ep_opts->group, &opts->func_inst.group); in f_midi2_alloc_inst()
2686 configfs_add_default_group(&block_opts->group, &ep_opts->group); in f_midi2_alloc_inst()