Lines Matching defs:opts

494 static void setup_descriptor(struct f_uac2_opts *opts)
499 if (EPOUT_EN(opts))
501 if (EPIN_EN(opts))
503 if (EPOUT_EN(opts))
505 if (EPIN_EN(opts))
507 if (EPOUT_EN(opts))
509 if (EPIN_EN(opts))
524 if (EPIN_EN(opts)) {
533 if (EPOUT_EN(opts)) {
547 if (EPIN_EN(opts))
549 if (EPOUT_EN(opts)) {
553 if (EPIN_EN(opts)) {
557 if (EPOUT_EN(opts)) {
566 if (EPIN_EN(opts)) {
580 if (EPIN_EN(opts))
582 if (EPOUT_EN(opts)) {
586 if (EPIN_EN(opts)) {
590 if (EPOUT_EN(opts)) {
599 if (EPIN_EN(opts)) {
612 struct f_uac2_opts *opts = g_audio_to_uac2_opts(agdev);
614 if (!opts->p_chmask && !opts->c_chmask) {
617 } else if (opts->p_chmask & ~UAC2_CHANNEL_MASK) {
620 } else if (opts->c_chmask & ~UAC2_CHANNEL_MASK) {
623 } else if ((opts->p_ssize < 1) || (opts->p_ssize > 4)) {
626 } else if ((opts->c_ssize < 1) || (opts->c_ssize > 4)) {
629 } else if (!opts->p_srate) {
632 } else if (!opts->c_srate) {
889 struct f_uac2_opts *opts;
898 opts = g_audio_to_uac2_opts(agdev);
899 p_srate = opts->p_srate;
900 c_srate = opts->c_srate;
930 struct f_uac2_opts *opts;
940 opts = g_audio_to_uac2_opts(agdev);
941 p_srate = opts->p_srate;
942 c_srate = opts->c_srate;
1054 struct f_uac2_opts *opts = to_f_uac2_opts(item);
1056 usb_put_function_instance(&opts->func_inst);
1067 struct f_uac2_opts *opts = to_f_uac2_opts(item); \
1070 mutex_lock(&opts->lock); \
1071 result = sprintf(page, "%u\n", opts->name); \
1072 mutex_unlock(&opts->lock); \
1080 struct f_uac2_opts *opts = to_f_uac2_opts(item); \
1084 mutex_lock(&opts->lock); \
1085 if (opts->refcnt) { \
1094 opts->name = num; \
1098 mutex_unlock(&opts->lock); \
1131 struct f_uac2_opts *opts;
1133 opts = container_of(f, struct f_uac2_opts, func_inst);
1134 kfree(opts);
1139 struct f_uac2_opts *opts;
1141 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
1142 if (!opts)
1145 mutex_init(&opts->lock);
1146 opts->func_inst.free_func_inst = afunc_free_inst;
1148 config_group_init_type_name(&opts->func_inst.group, "",
1151 opts->p_chmask = UAC2_DEF_PCHMASK;
1152 opts->p_srate = UAC2_DEF_PSRATE;
1153 opts->p_ssize = UAC2_DEF_PSSIZE;
1154 opts->c_chmask = UAC2_DEF_CCHMASK;
1155 opts->c_srate = UAC2_DEF_CSRATE;
1156 opts->c_ssize = UAC2_DEF_CSSIZE;
1157 opts->req_number = UAC2_DEF_REQ_NUM;
1158 return &opts->func_inst;
1164 struct f_uac2_opts *opts;
1167 opts = container_of(f->fi, struct f_uac2_opts, func_inst);
1169 mutex_lock(&opts->lock);
1170 --opts->refcnt;
1171 mutex_unlock(&opts->lock);
1187 struct f_uac2_opts *opts;
1193 opts = container_of(fi, struct f_uac2_opts, func_inst);
1194 mutex_lock(&opts->lock);
1195 ++opts->refcnt;
1196 mutex_unlock(&opts->lock);