lkml.org 
[lkml]   [2012]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/12] kobil_sct: Fix some bogus tty handling
On Fri, Jun 22, 2012 at 04:43:22PM +0100, Alan Cox wrote:
> Stuff noticed while doing the termios conversion.
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
>
> drivers/usb/serial/kobil_sct.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
> index fafeabb..0852472 100644
> --- a/drivers/usb/serial/kobil_sct.c
> +++ b/drivers/usb/serial/kobil_sct.c
> @@ -192,8 +192,8 @@ static void kobil_init_termios(struct tty_struct *tty)
> {
> /* Default to echo off and other sane device settings */
> tty->termios->c_lflag = 0;
> - tty->termios->c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
> - tty->termios->c_iflag = IGNBRK | IGNPAR | IXOFF;
> + tty->termios->c_iflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
> + tty->termios->c_iflag |= IGNBRK | IGNPAR | IXOFF;
> /* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
> tty->termios->c_oflag &= ~ONLCR;
> }
> @@ -588,7 +588,7 @@ static void kobil_set_termios(struct tty_struct *tty,
> if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
> priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
> /* This device doesn't support ioctl calls */
> - *tty->termios = *old;
> + tty_termios_copy_hw(tty->termios, old_termios);
> return;
> }
>

This patch also breaks the build:

drivers/usb/serial/kobil_sct.c: In function ‘kobil_set_termios’:
drivers/usb/serial/kobil_sct.c:591:37: error: ‘old_termios’ undeclared (first use in this function)
drivers/usb/serial/kobil_sct.c:591:37: note: each undeclared identifier is reported only once for each function it appears in


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-06-27 04:41    [W:0.160 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site