fsg_opts
struct fsg_opts *opts;
static inline struct fsg_opts *to_fsg_opts(struct config_item *item)
return container_of(to_config_group(item), struct fsg_opts,
struct fsg_opts *fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent);
return fsg_show_file(opts->lun, &fsg_opts->common->filesem, page);
struct fsg_opts *fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent);
return fsg_store_file(opts->lun, &fsg_opts->common->filesem, page, len);
struct fsg_opts *fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent);
return fsg_store_ro(opts->lun, &fsg_opts->common->filesem, page, len);
struct fsg_opts *fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent);
return fsg_store_cdrom(opts->lun, &fsg_opts->common->filesem, page,
struct fsg_opts *fsg_opts = to_fsg_opts(opts->group.cg_item.ci_parent);
return fsg_store_forced_eject(opts->lun, &fsg_opts->common->filesem,
struct fsg_opts *fsg_opts;
fsg_opts = to_fsg_opts(&group->cg_item);
mutex_lock(&fsg_opts->lock);
if (fsg_opts->refcnt || fsg_opts->common->luns[num]) {
ret = fsg_common_create_lun(fsg_opts->common, &config, num, name,
opts->lun = fsg_opts->common->luns[num];
mutex_unlock(&fsg_opts->lock);
mutex_unlock(&fsg_opts->lock);
struct fsg_opts *fsg_opts;
fsg_opts = to_fsg_opts(&group->cg_item);
mutex_lock(&fsg_opts->lock);
if (fsg_opts->refcnt) {
fsg_opts->common->luns[lun_opts->lun_id] = NULL;
mutex_unlock(&fsg_opts->lock);
struct fsg_opts *opts = to_fsg_opts(item);
struct fsg_opts *opts = to_fsg_opts(item);
struct fsg_opts *opts = to_fsg_opts(item);
struct fsg_opts *opts = to_fsg_opts(item);
struct fsg_opts *opts = to_fsg_opts(item);
struct fsg_opts *opts;
struct fsg_opts *opts;
struct fsg_opts *opts;
opts = container_of(f->fi, struct fsg_opts, func_inst);
struct fsg_opts *opts = fsg_opts_from_func_inst(fi);
static inline struct fsg_opts *
return container_of(fi, struct fsg_opts, func_inst);
struct fsg_opts *opts;
struct fsg_opts *opts;
struct fsg_opts *fsg_opts;
fsg_opts = fsg_opts_from_func_inst(fi_msg);
fsg_opts->no_configfs = true;
status = fsg_common_set_num_buffers(fsg_opts->common, fsg_num_buffers);
status = fsg_common_set_cdev(fsg_opts->common, cdev, config.can_stall);
fsg_common_set_sysfs(fsg_opts->common, true);
status = fsg_common_create_luns(fsg_opts->common, &config);
fsg_common_set_inquiry_string(fsg_opts->common, config.vendor_name,
fsg_common_remove_luns(fsg_opts->common);
fsg_common_free_buffers(fsg_opts->common);
struct fsg_opts *fsg_opts;
fsg_opts = fsg_opts_from_func_inst(fi_msg);
fsg_opts->no_configfs = true;
status = fsg_common_set_num_buffers(fsg_opts->common, fsg_num_buffers);
status = fsg_common_set_cdev(fsg_opts->common, cdev, fsg_config.can_stall);
fsg_common_set_sysfs(fsg_opts->common, true);
status = fsg_common_create_luns(fsg_opts->common, &fsg_config);
fsg_common_set_inquiry_string(fsg_opts->common, fsg_config.vendor_name,
fsg_common_remove_luns(fsg_opts->common);
fsg_common_free_buffers(fsg_opts->common);