mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
fdc01cc286
pnp string is usually much shorter than 1k so let's stop wasting 1k of memory for its buffer and make it dynamically alocated. This also removes 1k len limitation for pnp_string and adds a new line after string content if required. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
37 lines
806 B
C
37 lines
806 B
C
/*
|
|
* u_printer.h
|
|
*
|
|
* Utility definitions for the printer function
|
|
*
|
|
* Copyright (c) 2015 Samsung Electronics Co., Ltd.
|
|
* http://www.samsung.com
|
|
*
|
|
* Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef U_PRINTER_H
|
|
#define U_PRINTER_H
|
|
|
|
#include <linux/usb/composite.h>
|
|
|
|
struct f_printer_opts {
|
|
struct usb_function_instance func_inst;
|
|
int minor;
|
|
char *pnp_string;
|
|
bool pnp_string_allocated;
|
|
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 */
|