Lines Matching refs:opts
637 struct f_uac1_opts *opts = to_f_uac1_opts(item); in f_uac1_attr_release() local
639 usb_put_function_instance(&opts->func_inst); in f_uac1_attr_release()
651 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
654 mutex_lock(&opts->lock); \
655 result = sprintf(page, "%u\n", opts->name); \
656 mutex_unlock(&opts->lock); \
665 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
669 mutex_lock(&opts->lock); \
670 if (opts->refcnt) { \
679 opts->name = num; \
683 mutex_unlock(&opts->lock); \
716 struct f_uac1_opts *opts; in f_audio_free_inst() local
718 opts = container_of(f, struct f_uac1_opts, func_inst); in f_audio_free_inst()
719 kfree(opts); in f_audio_free_inst()
724 struct f_uac1_opts *opts; in f_audio_alloc_inst() local
726 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in f_audio_alloc_inst()
727 if (!opts) in f_audio_alloc_inst()
730 mutex_init(&opts->lock); in f_audio_alloc_inst()
731 opts->func_inst.free_func_inst = f_audio_free_inst; in f_audio_alloc_inst()
733 config_group_init_type_name(&opts->func_inst.group, "", in f_audio_alloc_inst()
736 opts->c_chmask = UAC1_DEF_CCHMASK; in f_audio_alloc_inst()
737 opts->c_srate = UAC1_DEF_CSRATE; in f_audio_alloc_inst()
738 opts->c_ssize = UAC1_DEF_CSSIZE; in f_audio_alloc_inst()
739 opts->p_chmask = UAC1_DEF_PCHMASK; in f_audio_alloc_inst()
740 opts->p_srate = UAC1_DEF_PSRATE; in f_audio_alloc_inst()
741 opts->p_ssize = UAC1_DEF_PSSIZE; in f_audio_alloc_inst()
742 opts->req_number = UAC1_DEF_REQ_NUM; in f_audio_alloc_inst()
743 return &opts->func_inst; in f_audio_alloc_inst()
749 struct f_uac1_opts *opts; in f_audio_free() local
752 opts = container_of(f->fi, struct f_uac1_opts, func_inst); in f_audio_free()
754 mutex_lock(&opts->lock); in f_audio_free()
755 --opts->refcnt; in f_audio_free()
756 mutex_unlock(&opts->lock); in f_audio_free()
772 struct f_uac1_opts *opts; in f_audio_alloc() local
779 opts = container_of(fi, struct f_uac1_opts, func_inst); in f_audio_alloc()
780 mutex_lock(&opts->lock); in f_audio_alloc()
781 ++opts->refcnt; in f_audio_alloc()
782 mutex_unlock(&opts->lock); in f_audio_alloc()