Loading drivers/serial/serial_core.c +28 −27 Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ static struct lock_class_key port_lock_key; #define uart_console(port) (0) #endif static void uart_change_speed(struct uart_state *state, struct ktermios *old_termios); static void uart_change_speed(struct uart_state *state, struct ktermios *old_termios); static void uart_wait_until_sent(struct tty_struct *tty, int timeout); static void uart_change_pm(struct uart_state *state, int pm_state); Loading Loading @@ -290,7 +291,7 @@ uart_update_timeout(struct uart_port *port, unsigned int cflag, break; default: bits = 10; break; // CS8 break; /* CS8 */ } if (cflag & CSTOPB) Loading Loading @@ -788,7 +789,8 @@ static int uart_set_info(struct uart_state *state, * We failed anyway. */ retval = -EBUSY; goto exit; // Added to return the correct error -Ram Gupta /* Added to return the correct error -Ram Gupta */ goto exit; } } Loading Loading @@ -1137,7 +1139,8 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, return ret; } static void uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios) static void uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios) { struct uart_state *state = tty->driver_data; unsigned long flags; Loading Loading @@ -1461,9 +1464,8 @@ uart_block_til_ready(struct file *filp, struct uart_state *state) */ if ((filp->f_flags & O_NONBLOCK) || (info->tty->termios->c_cflag & CLOCAL) || (info->tty->flags & (1 << TTY_IO_ERROR))) { (info->tty->flags & (1 << TTY_IO_ERROR))) break; } /* * Set DTR to allow modem to know we're waiting. Do Loading Loading @@ -1682,8 +1684,7 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i) return ret + 1; } if(capable(CAP_SYS_ADMIN)) { if (capable(CAP_SYS_ADMIN)) { mutex_lock(&state->mutex); pm_state = state->pm_state; if (pm_state) Loading Loading @@ -1992,11 +1993,11 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) /* * Wait for the transmitter to empty. */ for (tries = 3; !ops->tx_empty(port) && tries; tries--) { for (tries = 3; !ops->tx_empty(port) && tries; tries--) msleep(10); } if (!tries) printk(KERN_ERR "%s%s%s%d: Unable to drain transmitter\n", printk(KERN_ERR "%s%s%s%d: Unable to drain " "transmitter\n", port->dev ? port->dev->bus_id : "", port->dev ? ": " : "", drv->dev_name, port->line); Loading Loading
drivers/serial/serial_core.c +28 −27 Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ static struct lock_class_key port_lock_key; #define uart_console(port) (0) #endif static void uart_change_speed(struct uart_state *state, struct ktermios *old_termios); static void uart_change_speed(struct uart_state *state, struct ktermios *old_termios); static void uart_wait_until_sent(struct tty_struct *tty, int timeout); static void uart_change_pm(struct uart_state *state, int pm_state); Loading Loading @@ -290,7 +291,7 @@ uart_update_timeout(struct uart_port *port, unsigned int cflag, break; default: bits = 10; break; // CS8 break; /* CS8 */ } if (cflag & CSTOPB) Loading Loading @@ -788,7 +789,8 @@ static int uart_set_info(struct uart_state *state, * We failed anyway. */ retval = -EBUSY; goto exit; // Added to return the correct error -Ram Gupta /* Added to return the correct error -Ram Gupta */ goto exit; } } Loading Loading @@ -1137,7 +1139,8 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, return ret; } static void uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios) static void uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios) { struct uart_state *state = tty->driver_data; unsigned long flags; Loading Loading @@ -1461,9 +1464,8 @@ uart_block_til_ready(struct file *filp, struct uart_state *state) */ if ((filp->f_flags & O_NONBLOCK) || (info->tty->termios->c_cflag & CLOCAL) || (info->tty->flags & (1 << TTY_IO_ERROR))) { (info->tty->flags & (1 << TTY_IO_ERROR))) break; } /* * Set DTR to allow modem to know we're waiting. Do Loading Loading @@ -1682,8 +1684,7 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i) return ret + 1; } if(capable(CAP_SYS_ADMIN)) { if (capable(CAP_SYS_ADMIN)) { mutex_lock(&state->mutex); pm_state = state->pm_state; if (pm_state) Loading Loading @@ -1992,11 +1993,11 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) /* * Wait for the transmitter to empty. */ for (tries = 3; !ops->tx_empty(port) && tries; tries--) { for (tries = 3; !ops->tx_empty(port) && tries; tries--) msleep(10); } if (!tries) printk(KERN_ERR "%s%s%s%d: Unable to drain transmitter\n", printk(KERN_ERR "%s%s%s%d: Unable to drain " "transmitter\n", port->dev ? port->dev->bus_id : "", port->dev ? ": " : "", drv->dev_name, port->line); Loading