lkml.org 
[lkml]   [2007]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/1] mxser, remove it
    > +	if (cmd == MOXA_SET_SPECIAL_BAUD_RATE) {
    > + int speed;
    > +
    > + if (get_user(speed, (int __user *)argp))
    > + return -EFAULT;
    > + if (speed <= 0 || speed > info->max_baud)
    > + return -EFAULT;

    -EINVAL

    > + if (!info->tty || !info->tty->termios || !info->ioaddr)
    > + return 0;

    !info->tty and !info->tty->termios can't happen

    > + info->tty->termios->c_cflag &= ~(CBAUD | CBAUDEX);

    No...

    > + for (i = 0; i < BAUD_TABLE_NO; i++)
    > + if (speed == mxvar_baud_table[i])
    > + break;
    > + if (i == BAUD_TABLE_NO) {
    > + info->tty->termios->c_cflag |= B_SPEC;
    > + } else if (speed != 0)
    > + info->tty->termios->c_cflag |= mxvar_baud_table1[i];

    Replace all the above mess with a single tty_encode_baud_rate call



    \
     
     \ /
      Last update: 2007-12-29 03:41    [W:3.528 / U:4.608 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site