summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_mass_storage.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2013-10-09 10:06:05 +0200
committerFelipe Balbi <balbi@ti.com>2013-10-10 10:24:27 -0500
commitef0aa4b92cf10a7684135c61dc406398308b328f (patch)
treed2147f3c87db29e438197dcfab9d7338e190d765 /drivers/usb/gadget/f_mass_storage.h
parent864328ef8e735403f85b768284001a4187d6868f (diff)
downloadop-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.h17
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 {
OpenPOWER on IntegriCloud