aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_hid.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz2014-11-06 11:12:03 +0100
committerFelipe Balbi2014-11-06 16:18:19 -0600
commit21a9476a7ba847e413bf1c144d7c614532aed6dd (patch)
tree606683b13651d00398aa9a0b5a873fcf1d49ba32 /drivers/usb/gadget/function/u_hid.h
parent5ca8d3ec9970f4798e68bd21a9d44db3d0ff4da7 (diff)
usb: gadget: hid: add configfs support
Make the hid function available for gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_hid.h')
-rw-r--r--drivers/usb/gadget/function/u_hid.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_hid.h b/drivers/usb/gadget/function/u_hid.h
index 3edfc9567ab7..aaa0e368a159 100644
--- a/drivers/usb/gadget/function/u_hid.h
+++ b/drivers/usb/gadget/function/u_hid.h
@@ -27,6 +27,13 @@ struct f_hid_opts {
unsigned short report_desc_length;
unsigned char *report_desc;
bool report_desc_alloc;
+
+ /*
+ * Protect the data form concurrent access by read/write
+ * and create symlink/remove symlink.
+ */
+ struct mutex lock;
+ int refcnt;
};
int ghid_setup(struct usb_gadget *g, int count);