summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/u_hid.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-11-06 11:12:03 +0100
committerFelipe Balbi <balbi@ti.com>2014-11-06 23:18:19 +0100
commit21a9476a7ba847e413bf1c144d7c614532aed6dd (patch)
tree606683b13651d00398aa9a0b5a873fcf1d49ba32 /drivers/usb/gadget/function/u_hid.h
parentusb: gadget: f_hid: use usb_gstrings_attach (diff)
downloadlinux-21a9476a7ba847e413bf1c144d7c614532aed6dd.tar.xz
linux-21a9476a7ba847e413bf1c144d7c614532aed6dd.zip
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);