Nishad Kamdar | 2e75973 | 2020-03-28 16:41:15 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Andrzej Pietrasiewicz | b26394b | 2015-03-03 10:52:28 +0100 | [diff] [blame] | 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 | * |
Andrzej Pietrasiewicz | 1b4a3b5 | 2018-12-13 14:24:57 +0100 | [diff] [blame] | 10 | * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> |
Andrzej Pietrasiewicz | b26394b | 2015-03-03 10:52:28 +0100 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #ifndef U_PRINTER_H |
| 14 | #define U_PRINTER_H |
| 15 | |
| 16 | #include <linux/usb/composite.h> |
| 17 | |
Andrzej Pietrasiewicz | b26394b | 2015-03-03 10:52:28 +0100 | [diff] [blame] | 18 | struct f_printer_opts { |
| 19 | struct usb_function_instance func_inst; |
| 20 | int minor; |
Krzysztof Opasiak | fdc01cc | 2016-12-21 09:48:45 +0100 | [diff] [blame] | 21 | char *pnp_string; |
| 22 | bool pnp_string_allocated; |
Andrzej Pietrasiewicz | b26394b | 2015-03-03 10:52:28 +0100 | [diff] [blame] | 23 | unsigned q_len; |
Andrzej Pietrasiewicz | ee1cd51 | 2015-03-03 10:52:32 +0100 | [diff] [blame] | 24 | |
| 25 | /* |
| 26 | * Protect the data from concurrent access by read/write |
| 27 | * and create symlink/remove symlink |
| 28 | */ |
| 29 | struct mutex lock; |
| 30 | int refcnt; |
Andrzej Pietrasiewicz | b26394b | 2015-03-03 10:52:28 +0100 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | #endif /* U_PRINTER_H */ |