summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_printer.h
diff options
context:
space:
mode:
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 */