u_printer.h 821 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * u_printer.h
  3. *
  4. * Utility definitions for the printer function
  5. *
  6. * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  7. * http://www.samsung.com
  8. *
  9. * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. */
  15. #ifndef U_PRINTER_H
  16. #define U_PRINTER_H
  17. #include <linux/usb/composite.h>
  18. #define PNP_STRING_LEN 1024
  19. struct f_printer_opts {
  20. struct usb_function_instance func_inst;
  21. int minor;
  22. char pnp_string[PNP_STRING_LEN];
  23. unsigned q_len;
  24. /*
  25. * Protect the data from concurrent access by read/write
  26. * and create symlink/remove symlink
  27. */
  28. struct mutex lock;
  29. int refcnt;
  30. };
  31. #endif /* U_PRINTER_H */