summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_midi.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-10-16 15:33:31 +0400
committerFelipe Balbi <balbi@ti.com>2014-11-05 22:37:17 +0300
commit6f1de344557315a8e5de0d15a28276198ca7fdac (patch)
treef3dd990db3f31af7d14b61cca36be9429993da2c /drivers/usb/gadget/function/u_midi.h
parent9caa0d77f7ce6ca0ec6bb81e28a93db1b6287b0f (diff)
downloadlinux-6f1de344557315a8e5de0d15a28276198ca7fdac.tar.xz
usb: gadget: f_midi: add configfs support
Make the midi 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_midi.h')
-rw-r--r--drivers/usb/gadget/function/u_midi.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_midi.h b/drivers/usb/gadget/function/u_midi.h
index 76bccc1fdbb4..22510189758e 100644
--- a/drivers/usb/gadget/function/u_midi.h
+++ b/drivers/usb/gadget/function/u_midi.h
@@ -22,10 +22,18 @@ struct f_midi_opts {
struct usb_function_instance func_inst;
int index;
char *id;
+ bool id_allocated;
unsigned int in_ports;
unsigned int out_ports;
unsigned int buflen;
unsigned int qlen;
+
+ /*
+ * Protect the data form concurrent access by read/write
+ * and create symlink/remove symlink.
+ */
+ struct mutex lock;
+ int refcnt;
};
#endif /* U_MIDI_H */