summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/u_ecm.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2013-05-23 10:32:06 +0200
committerFelipe Balbi <balbi@ti.com>2013-06-10 17:27:54 +0300
commitda92801c647cdebfd45001fd6aaecb8f0be7f56b (patch)
treefcf0e995a6f75eeda6fabe584a2062af3a33869c /drivers/usb/gadget/u_ecm.h
parent06b72598e819cf60ebf2267b94c7044ff550d076 (diff)
usb: gadget: f_ecm: add configfs support
f_ecm learns about our new configfs-based binding. 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_ecm.h')
-rw-r--r--drivers/usb/gadget/u_ecm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_ecm.h b/drivers/usb/gadget/u_ecm.h
index 99b6b995988..262cc03cc2c 100644
--- a/drivers/usb/gadget/u_ecm.h
+++ b/drivers/usb/gadget/u_ecm.h
@@ -22,6 +22,15 @@ struct f_ecm_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_ECM_H */