ipoctal: make it compile with the termios changes
authorAlan Cox <alan@linux.intel.com>
Thu, 26 Jul 2012 18:00:51 +0000 (19:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Aug 2012 20:02:10 +0000 (13:02 -0700)
Also fix the silly speed setting bug.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/devices/ipoctal.c

index fd0e30132ca247565dc05993ed79749100cd9d6a..394f5deca34e17995e9d802b1e28be14c3349366 100644 (file)
@@ -617,7 +617,7 @@ static void ipoctal_set_termios(struct tty_struct *tty,
        struct ipoctal *ipoctal = tty->driver_data;
        speed_t baud;
 
-       cflag = tty->termios->c_cflag;
+       cflag = tty->termios.c_cflag;
 
        /* Disable and reset everything before change the setup */
        ipoctal_write_io_reg(ipoctal, &ipoctal->chan_regs[channel].u.w.cr,
@@ -643,7 +643,7 @@ static void ipoctal_set_termios(struct tty_struct *tty,
        default:
                mr1 |= MR1_CHRL_8_BITS;
                /* By default, select CS8 */
-               tty->termios->c_cflag = (cflag & ~CSIZE) | CS8;
+               tty->termios.c_cflag = (cflag & ~CSIZE) | CS8;
                break;
        }
 
@@ -657,7 +657,7 @@ static void ipoctal_set_termios(struct tty_struct *tty,
                mr1 |= MR1_PARITY_OFF;
 
        /* Mark or space parity is not supported */
-       tty->termios->c_cflag &= ~CMSPAR;
+       tty->termios.c_cflag &= ~CMSPAR;
 
        /* Set stop bits */
        if (cflag & CSTOPB)
@@ -690,10 +690,10 @@ static void ipoctal_set_termios(struct tty_struct *tty,
        }
 
        baud = tty_get_baud_rate(tty);
-       tty_termios_encode_baud_rate(tty->termios, baud, baud);
+       tty_termios_encode_baud_rate(&tty->termios, baud, baud);
 
        /* Set baud rate */
-       switch (tty->termios->c_ospeed) {
+       switch (baud) {
        case 75:
                csr |= TX_CLK_75 | RX_CLK_75;
                break;
@@ -734,7 +734,7 @@ static void ipoctal_set_termios(struct tty_struct *tty,
        default:
                csr |= TX_CLK_38400 | RX_CLK_38400;
                /* In case of default, we establish 38400 bps */
-               tty_termios_encode_baud_rate(tty->termios, 38400, 38400);
+               tty_termios_encode_baud_rate(&tty->termios, 38400, 38400);
                break;
        }