u_midi.h 702 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * u_midi.h
  4. *
  5. * Utility definitions for the midi function
  6. *
  7. * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  8. * http://www.samsung.com
  9. *
  10. * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
  11. */
  12. #ifndef U_MIDI_H
  13. #define U_MIDI_H
  14. #include <linux/usb/composite.h>
  15. struct f_midi_opts {
  16. struct usb_function_instance func_inst;
  17. int index;
  18. char *id;
  19. bool id_allocated;
  20. unsigned int in_ports;
  21. unsigned int out_ports;
  22. unsigned int buflen;
  23. unsigned int qlen;
  24. /*
  25. * Protect the data form concurrent access by read/write
  26. * and create symlink/remove symlink.
  27. */
  28. struct mutex lock;
  29. int refcnt;
  30. };
  31. #endif /* U_MIDI_H */