summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/u_gether.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2013-05-28 11:15:56 +0400
committerFelipe Balbi <balbi@ti.com>2013-06-10 18:58:08 +0400
commit02832e56f88a981474ee4c7c141f46fc1b4454f4 (patch)
tree9d69ab395696bb866ec54f17f2ecc4c67dbda84d /drivers/usb/gadget/u_gether.h
parent74bf963d1d230b0cedbcbc46f6f15f20c2e3ee55 (diff)
downloadlinux-02832e56f88a981474ee4c7c141f46fc1b4454f4.tar.xz
usb: gadget: f_subset: add configfs support
f_subset learns about configfs so we can, eventually, remove in-kernel gadget drivers. 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/u_gether.h')
-rw-r--r--drivers/usb/gadget/u_gether.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_gether.h b/drivers/usb/gadget/u_gether.h
index 3a4a2bf61cdc..d4078426ba5d 100644
--- a/drivers/usb/gadget/u_gether.h
+++ b/drivers/usb/gadget/u_gether.h
@@ -22,6 +22,15 @@ struct f_gether_opts {
struct usb_function_instance func_inst;
struct net_device *net;
bool bound;
+
+ /*
+ * 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;
};
#endif /* U_GETHER_H */