]> git.decadent.org.uk Git - exar-uart-driver.git/commitdiff
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 b0b30d758c26dad9605d89506189a973c1b8d7a6..e5688533bedd3e73a112699f3e76a8eafd613050 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 3470ce148ab08ce4d61fe28950dd64a6c3378afe..4ba6fe3a9e855a6186969286881501d05053edaa 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 */
 
 };