diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2014-11-06 11:12:03 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-06 23:18:19 +0100 |
commit | 21a9476a7ba847e413bf1c144d7c614532aed6dd (patch) | |
tree | 606683b13651d00398aa9a0b5a873fcf1d49ba32 /drivers/usb/gadget/function/u_hid.h | |
parent | usb: gadget: f_hid: use usb_gstrings_attach (diff) | |
download | linux-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.h | 7 |
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); |