diff options
Diffstat (limited to 'drivers/char/stallion.c')
-rw-r--r-- | drivers/char/stallion.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 45aeeeab9f4a..b976248e1072 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -1025,7 +1025,7 @@ static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count | |||
1025 | 1025 | ||
1026 | /*****************************************************************************/ | 1026 | /*****************************************************************************/ |
1027 | 1027 | ||
1028 | static void stl_putchar(struct tty_struct *tty, unsigned char ch) | 1028 | static int stl_putchar(struct tty_struct *tty, unsigned char ch) |
1029 | { | 1029 | { |
1030 | struct stlport *portp; | 1030 | struct stlport *portp; |
1031 | unsigned int len; | 1031 | unsigned int len; |
@@ -1034,12 +1034,12 @@ static void stl_putchar(struct tty_struct *tty, unsigned char ch) | |||
1034 | pr_debug("stl_putchar(tty=%p,ch=%x)\n", tty, ch); | 1034 | pr_debug("stl_putchar(tty=%p,ch=%x)\n", tty, ch); |
1035 | 1035 | ||
1036 | if (tty == NULL) | 1036 | if (tty == NULL) |
1037 | return; | 1037 | return -EINVAL; |
1038 | portp = tty->driver_data; | 1038 | portp = tty->driver_data; |
1039 | if (portp == NULL) | 1039 | if (portp == NULL) |
1040 | return; | 1040 | return -EINVAL; |
1041 | if (portp->tx.buf == NULL) | 1041 | if (portp->tx.buf == NULL) |
1042 | return; | 1042 | return -EINVAL; |
1043 | 1043 | ||
1044 | head = portp->tx.head; | 1044 | head = portp->tx.head; |
1045 | tail = portp->tx.tail; | 1045 | tail = portp->tx.tail; |
@@ -1053,6 +1053,7 @@ static void stl_putchar(struct tty_struct *tty, unsigned char ch) | |||
1053 | head = portp->tx.buf; | 1053 | head = portp->tx.buf; |
1054 | } | 1054 | } |
1055 | portp->tx.head = head; | 1055 | portp->tx.head = head; |
1056 | return 0; | ||
1056 | } | 1057 | } |
1057 | 1058 | ||
1058 | /*****************************************************************************/ | 1059 | /*****************************************************************************/ |
@@ -1460,19 +1461,20 @@ static void stl_hangup(struct tty_struct *tty) | |||
1460 | 1461 | ||
1461 | /*****************************************************************************/ | 1462 | /*****************************************************************************/ |
1462 | 1463 | ||
1463 | static void stl_breakctl(struct tty_struct *tty, int state) | 1464 | static int stl_breakctl(struct tty_struct *tty, int state) |
1464 | { | 1465 | { |
1465 | struct stlport *portp; | 1466 | struct stlport *portp; |
1466 | 1467 | ||
1467 | pr_debug("stl_breakctl(tty=%p,state=%d)\n", tty, state); | 1468 | pr_debug("stl_breakctl(tty=%p,state=%d)\n", tty, state); |
1468 | 1469 | ||
1469 | if (tty == NULL) | 1470 | if (tty == NULL) |
1470 | return; | 1471 | return -EINVAL; |
1471 | portp = tty->driver_data; | 1472 | portp = tty->driver_data; |
1472 | if (portp == NULL) | 1473 | if (portp == NULL) |
1473 | return; | 1474 | return -EINVAL; |
1474 | 1475 | ||
1475 | stl_sendbreak(portp, ((state == -1) ? 1 : 2)); | 1476 | stl_sendbreak(portp, ((state == -1) ? 1 : 2)); |
1477 | return 0; | ||
1476 | } | 1478 | } |
1477 | 1479 | ||
1478 | /*****************************************************************************/ | 1480 | /*****************************************************************************/ |