Lines Matching refs:opts
1184 static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts) in ffs_fs_parse_opts() argument
1188 if (!opts || !*opts) in ffs_fs_parse_opts()
1196 comma = strchr(opts, ','); in ffs_fs_parse_opts()
1201 eq = strchr(opts, '='); in ffs_fs_parse_opts()
1203 pr_err("'=' missing in %s\n", opts); in ffs_fs_parse_opts()
1210 pr_err("%s: invalid value: %s\n", opts, eq + 1); in ffs_fs_parse_opts()
1215 switch (eq - opts) { in ffs_fs_parse_opts()
1217 if (!memcmp(opts, "no_disconnect", 13)) in ffs_fs_parse_opts()
1223 if (!memcmp(opts, "rmode", 5)) in ffs_fs_parse_opts()
1225 else if (!memcmp(opts, "fmode", 5)) in ffs_fs_parse_opts()
1232 if (!memcmp(opts, "mode", 4)) { in ffs_fs_parse_opts()
1241 if (!memcmp(opts, "uid", 3)) { in ffs_fs_parse_opts()
1244 pr_err("%s: unmapped value: %lu\n", opts, value); in ffs_fs_parse_opts()
1247 } else if (!memcmp(opts, "gid", 3)) { in ffs_fs_parse_opts()
1250 pr_err("%s: unmapped value: %lu\n", opts, value); in ffs_fs_parse_opts()
1260 pr_err("%s: invalid option\n", opts); in ffs_fs_parse_opts()
1267 opts = comma + 1; in ffs_fs_parse_opts()
1277 const char *dev_name, void *opts) in ffs_fs_mount() argument
1295 ret = ffs_fs_parse_opts(&data, opts); in ffs_fs_mount()
3115 struct f_fs_opts *opts = to_ffs_opts(item); in ffs_attr_release() local
3117 usb_put_function_instance(&opts->func_inst); in ffs_attr_release()
3134 struct f_fs_opts *opts; in ffs_free_inst() local
3136 opts = to_f_fs_opts(f); in ffs_free_inst()
3138 _ffs_free_dev(opts->dev); in ffs_free_inst()
3140 kfree(opts); in ffs_free_inst()
3147 struct f_fs_opts *opts; in ffs_set_inst_name() local
3160 opts = to_f_fs_opts(fi); in ffs_set_inst_name()
3165 tmp = opts->dev->name_allocated ? opts->dev->name : NULL; in ffs_set_inst_name()
3166 ret = _ffs_name_dev(opts->dev, ptr); in ffs_set_inst_name()
3172 opts->dev->name_allocated = true; in ffs_set_inst_name()
3183 struct f_fs_opts *opts; in ffs_alloc_inst() local
3186 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in ffs_alloc_inst()
3187 if (!opts) in ffs_alloc_inst()
3190 opts->func_inst.set_inst_name = ffs_set_inst_name; in ffs_alloc_inst()
3191 opts->func_inst.free_func_inst = ffs_free_inst; in ffs_alloc_inst()
3196 kfree(opts); in ffs_alloc_inst()
3199 opts->dev = dev; in ffs_alloc_inst()
3200 dev->opts = opts; in ffs_alloc_inst()
3202 config_group_init_type_name(&opts->func_inst.group, "", in ffs_alloc_inst()
3204 return &opts->func_inst; in ffs_alloc_inst()
3217 struct f_fs_opts *opts = in ffs_func_unbind() local
3229 if (!--opts->refcnt) in ffs_func_unbind()
3445 struct f_fs_opts *opts; in ffs_closed() local
3460 if (ffs_obj->opts) in ffs_closed()
3461 opts = ffs_obj->opts; in ffs_closed()
3465 if (opts->no_configfs || !opts->func_inst.group.cg_item.ci_parent in ffs_closed()
3466 || !atomic_read(&opts->func_inst.group.cg_item.ci_kref.refcount)) in ffs_closed()
3469 unregister_gadget_item(ffs_obj->opts-> in ffs_closed()