Remove redundant members of struct acm master
authorBen Hutchings <ben@decadent.org.uk>
Tue, 10 Nov 2015 20:26:14 +0000 (20:26 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Nov 2015 20:26:14 +0000 (20:26 +0000)
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
vizzini.h

index b0b30d7..e568853 100644 (file)
--- 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)
index 3470ce1..4ba6fe3 100644 (file)
--- 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 */
 
 };