diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2013-10-09 10:06:05 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-10-10 10:24:27 -0500 |
commit | ef0aa4b92cf10a7684135c61dc406398308b328f (patch) | |
tree | d2147f3c87db29e438197dcfab9d7338e190d765 /drivers/usb/gadget/f_mass_storage.h | |
parent | 864328ef8e735403f85b768284001a4187d6868f (diff) | |
download | op-kernel-dev-ef0aa4b92cf10a7684135c61dc406398308b328f.zip op-kernel-dev-ef0aa4b92cf10a7684135c61dc406398308b328f.tar.gz |
usb: gadget: f_mass_storage: add configfs support
From this commit on f_mass_storage is available through configfs.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/f_mass_storage.h')
-rw-r--r-- | drivers/usb/gadget/f_mass_storage.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.h b/drivers/usb/gadget/f_mass_storage.h index b53cf8c..7d421d2 100644 --- a/drivers/usb/gadget/f_mass_storage.h +++ b/drivers/usb/gadget/f_mass_storage.h @@ -71,10 +71,27 @@ struct fsg_operations { int (*thread_exits)(struct fsg_common *common); }; +struct fsg_lun_opts { + struct config_group group; + struct fsg_lun *lun; + int lun_id; +}; + struct fsg_opts { struct fsg_common *common; struct usb_function_instance func_inst; + struct fsg_lun_opts lun0; + struct config_group *default_groups[2]; bool no_configfs; /* for legacy gadgets */ + + /* + * Read/write access to configfs attributes is handled by configfs. + * + * This is to protect the data from concurrent access by read/write + * and create symlink/remove symlink. + */ + struct mutex lock; + int refcnt; }; struct fsg_lun_config { |