diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 15:23:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 15:23:20 -0400 |
commit | 99dff5856220a02b8711f2e8746413ea6e53ccf6 (patch) | |
tree | d8bae7ccdf8f7ad5221b053bb74a6220df996b3a /drivers/net/wan | |
parent | bb74e8ca352eecefdc5c1a9ebab01f18aa2f6f3c (diff) | |
parent | d9a0fbfd7bc5d2c42f0fa9bcbdab62c4942d0388 (diff) |
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
tty/serial: Fix break handling for PORT_TEGRA
tty/serial: Add explicit PORT_TEGRA type
n_tracerouter and n_tracesink ldisc additions.
Intel PTI implementaiton of MIPI 1149.7.
Kernel documentation for the PTI feature.
export kernel call get_task_comm().
tty: Remove to support serial for S5P6442
pch_phub: Support new device ML7223
8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
ASoC: Update cx20442 for TTY API change
pch_uart: Support new device ML7223 IOH
parport: Use request_muxed_region for IT87 probe and lock
tty/serial: add support for Xilinx PS UART
n_gsm: Use print_hex_dump_bytes
drivers/tty/moxa.c: Put correct tty value
TTY: tty_io, annotate locking functions
TTY: serial_core, remove superfluous set_task_state
TTY: serial_core, remove invalid test
Char: moxa, fix locking in moxa_write
...
Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
drivers/tty/serial/Makefile.
I did the hci_ldisc thing as an evil merge, cleaning things up.
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/x25_asy.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 24297b274cd4..40398bf7d036 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -517,17 +517,18 @@ static int x25_asy_close(struct net_device *dev) | |||
517 | * and sent on to some IP layer for further processing. | 517 | * and sent on to some IP layer for further processing. |
518 | */ | 518 | */ |
519 | 519 | ||
520 | static void x25_asy_receive_buf(struct tty_struct *tty, | 520 | static unsigned int x25_asy_receive_buf(struct tty_struct *tty, |
521 | const unsigned char *cp, char *fp, int count) | 521 | const unsigned char *cp, char *fp, int count) |
522 | { | 522 | { |
523 | struct x25_asy *sl = tty->disc_data; | 523 | struct x25_asy *sl = tty->disc_data; |
524 | int bytes = count; | ||
524 | 525 | ||
525 | if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev)) | 526 | if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev)) |
526 | return; | 527 | return; |
527 | 528 | ||
528 | 529 | ||
529 | /* Read the characters out of the buffer */ | 530 | /* Read the characters out of the buffer */ |
530 | while (count--) { | 531 | while (bytes--) { |
531 | if (fp && *fp++) { | 532 | if (fp && *fp++) { |
532 | if (!test_and_set_bit(SLF_ERROR, &sl->flags)) | 533 | if (!test_and_set_bit(SLF_ERROR, &sl->flags)) |
533 | sl->dev->stats.rx_errors++; | 534 | sl->dev->stats.rx_errors++; |
@@ -536,6 +537,8 @@ static void x25_asy_receive_buf(struct tty_struct *tty, | |||
536 | } | 537 | } |
537 | x25_asy_unesc(sl, *cp++); | 538 | x25_asy_unesc(sl, *cp++); |
538 | } | 539 | } |
540 | |||
541 | return count; | ||
539 | } | 542 | } |
540 | 543 | ||
541 | /* | 544 | /* |