summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_printer.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2015-03-03 10:52:32 +0100
committerFelipe Balbi <balbi@ti.com>2015-03-10 15:33:41 -0500
commitee1cd515e889d222f5a7397fead0a9db1214edea (patch)
tree8946a1608e69546a85d4311ca6ab5bdcd3852a3f /drivers/usb/gadget/function/u_printer.h
parenta2a8e48a94c78c72b5dd1e4c8d190c5c54aca7a4 (diff)
usb: gadget: printer: add configfs support
Add support for configfs interface so that f_printer can be used as a component of usb gadgets composed with it. 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_printer.h')
-rw-r--r--drivers/usb/gadget/function/u_printer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_printer.h b/drivers/usb/gadget/function/u_printer.h
index b2338cacdfe4..0e2c49d4274e 100644
--- a/drivers/usb/gadget/function/u_printer.h
+++ b/drivers/usb/gadget/function/u_printer.h
@@ -25,6 +25,13 @@ struct f_printer_opts {
int minor;
char pnp_string[PNP_STRING_LEN];
unsigned q_len;
+
+ /*
+ * Protect the data from concurrent access by read/write
+ * and create symlink/remove symlink
+ */
+ struct mutex lock;
+ int refcnt;
};
#endif /* U_PRINTER_H */