From 68fc20fade2c8755352f708d4e3e28883cbc7c75 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 10 Nov 2015 20:26:14 +0000 Subject: [PATCH] Remove redundant members of struct acm preciseflags is always zero since removing the custom ioctls. trans9 is only used in acm_tty_set_termios() and is recalculated each time. --- vizzini.c | 11 +++-------- vizzini.h | 2 -- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/vizzini.c b/vizzini.c index b0b30d7..e568853 100644 --- a/vizzini.c +++ b/vizzini.c @@ -1094,7 +1094,6 @@ static void acm_tty_set_termios(struct tty_struct *tty, } else { format_size = UART_FORMAT_SIZE_8; } - acm->trans9 = (format_size == UART_FORMAT_SIZE_9); if (cflag & PARENB) { if (cflag & PARODD) { @@ -1142,13 +1141,9 @@ static void acm_tty_set_termios(struct tty_struct *tty, vizzini_set_reg(acm, block, UART_FLOW, flow); vizzini_set_reg(acm, block, UART_GPIO_MODE, gpio_mode); - if (acm->trans9) { - /* Turn on wide mode if we're 9-bit transparent. */ - vizzini_set_reg(acm, EPLOCALS_REG_BLOCK, (block * MEM_EP_LOCALS_SIZE) + EP_WIDE_MODE, 1); - } else if (!acm->preciseflags) { - /* Turn off wide mode unless we have precise flags. */ - vizzini_set_reg(acm, EPLOCALS_REG_BLOCK, (block * MEM_EP_LOCALS_SIZE) + EP_WIDE_MODE, 0); - } + vizzini_set_reg(acm, EPLOCALS_REG_BLOCK, + (block * MEM_EP_LOCALS_SIZE) + EP_WIDE_MODE, + format_size == UART_FORMAT_SIZE_9); rate = cpu_to_le32(tty_get_baud_rate(tty)); if(rate) diff --git a/vizzini.h b/vizzini.h index 3470ce1..4ba6fe3 100644 --- a/vizzini.h +++ b/vizzini.h @@ -199,8 +199,6 @@ struct acm { unsigned long quirks; int block; - int preciseflags; /* USB: wide mode, TTY: flags per character */ - int trans9; /* USB: wide mode, serial 9N1 */ }; -- 2.39.5