Lines Matching refs:opts
639 struct f_uac1_opts *opts = to_f_uac1_opts(item); in f_uac1_attr_release() local
641 usb_put_function_instance(&opts->func_inst); in f_uac1_attr_release()
653 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
656 mutex_lock(&opts->lock); \
657 result = sprintf(page, "%u\n", opts->name); \
658 mutex_unlock(&opts->lock); \
667 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
671 mutex_lock(&opts->lock); \
672 if (opts->refcnt) { \
681 opts->name = num; \
685 mutex_unlock(&opts->lock); \
718 struct f_uac1_opts *opts; in f_audio_free_inst() local
720 opts = container_of(f, struct f_uac1_opts, func_inst); in f_audio_free_inst()
721 kfree(opts); in f_audio_free_inst()
726 struct f_uac1_opts *opts; in f_audio_alloc_inst() local
728 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in f_audio_alloc_inst()
729 if (!opts) in f_audio_alloc_inst()
732 mutex_init(&opts->lock); in f_audio_alloc_inst()
733 opts->func_inst.free_func_inst = f_audio_free_inst; in f_audio_alloc_inst()
735 config_group_init_type_name(&opts->func_inst.group, "", in f_audio_alloc_inst()
738 opts->c_chmask = UAC1_DEF_CCHMASK; in f_audio_alloc_inst()
739 opts->c_srate = UAC1_DEF_CSRATE; in f_audio_alloc_inst()
740 opts->c_ssize = UAC1_DEF_CSSIZE; in f_audio_alloc_inst()
741 opts->p_chmask = UAC1_DEF_PCHMASK; in f_audio_alloc_inst()
742 opts->p_srate = UAC1_DEF_PSRATE; in f_audio_alloc_inst()
743 opts->p_ssize = UAC1_DEF_PSSIZE; in f_audio_alloc_inst()
744 opts->req_number = UAC1_DEF_REQ_NUM; in f_audio_alloc_inst()
745 return &opts->func_inst; in f_audio_alloc_inst()
751 struct f_uac1_opts *opts; in f_audio_free() local
754 opts = container_of(f->fi, struct f_uac1_opts, func_inst); in f_audio_free()
756 mutex_lock(&opts->lock); in f_audio_free()
757 --opts->refcnt; in f_audio_free()
758 mutex_unlock(&opts->lock); in f_audio_free()
774 struct f_uac1_opts *opts; in f_audio_alloc() local
781 opts = container_of(fi, struct f_uac1_opts, func_inst); in f_audio_alloc()
782 mutex_lock(&opts->lock); in f_audio_alloc()
783 ++opts->refcnt; in f_audio_alloc()
784 mutex_unlock(&opts->lock); in f_audio_alloc()