staging: dgnc: use tty_alloc_driver instead of kcalloc
Subsystems (2)
PATCH 1/1 staging: dgnc: use tty_alloc_driver instead of kcalloc
The tty_alloc_driver() can allocate memory for ttys and termios. And also allocated memory will be released easily with put_tty_driver() call.
Signed-off-by Daeseok Youn <[email protected]>
--- drivers/staging/dgnc/dgnc_driver.h | 4 +- drivers/staging/dgnc/dgnc_tty.c | 144 ++++++++++++++++--------------------- 2 files changed, 62 insertions(+), 86 deletions(-)
drivers/staging/dgnc/dgnc_driver.h +2 -2
@@ -202,9 +202,9 @@ struct dgnc_board {* to our channels. */ -struct tty_driver serial_driver; +struct tty_driver *serial_driver;char serial_name[200 ]; -struct tty_driver print_driver; +struct tty_driver *print_driver;char print_name[200 ];bool dgnc_major_serial_registered;
drivers/staging/dgnc/dgnc_tty.c +60 -84
222 lines not on this page · raw message
Signature · 1 line
2.8.1