u_printer.h 657 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * u_printer.h
  4. *
  5. * Utility definitions for the printer function
  6. *
  7. * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  8. * http://www.samsung.com
  9. *
  10. * Author: Andrzej Pietrasiewicz <[email protected]>
  11. */
  12. #ifndef U_PRINTER_H
  13. #define U_PRINTER_H
  14. #include <linux/usb/composite.h>
  15. struct f_printer_opts {
  16. struct usb_function_instance func_inst;
  17. int minor;
  18. char *pnp_string;
  19. bool pnp_string_allocated;
  20. unsigned q_len;
  21. /*
  22. * Protect the data from concurrent access by read/write
  23. * and create symlink/remove symlink
  24. */
  25. struct mutex lock;
  26. int refcnt;
  27. };
  28. #endif /* U_PRINTER_H */