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/hamradio/mkiss.c | |
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/hamradio/mkiss.c')
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 4c628393c8b1..0e4f23531140 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -923,13 +923,14 @@ static long mkiss_compat_ioctl(struct tty_struct *tty, struct file *file, | |||
923 | * a block of data has been received, which can now be decapsulated | 923 | * a block of data has been received, which can now be decapsulated |
924 | * and sent on to the AX.25 layer for further processing. | 924 | * and sent on to the AX.25 layer for further processing. |
925 | */ | 925 | */ |
926 | static void mkiss_receive_buf(struct tty_struct *tty, const unsigned char *cp, | 926 | static unsigned int mkiss_receive_buf(struct tty_struct *tty, |
927 | char *fp, int count) | 927 | const unsigned char *cp, char *fp, int count) |
928 | { | 928 | { |
929 | struct mkiss *ax = mkiss_get(tty); | 929 | struct mkiss *ax = mkiss_get(tty); |
930 | int bytes = count; | ||
930 | 931 | ||
931 | if (!ax) | 932 | if (!ax) |
932 | return; | 933 | return -ENODEV; |
933 | 934 | ||
934 | /* | 935 | /* |
935 | * Argh! mtu change time! - costs us the packet part received | 936 | * Argh! mtu change time! - costs us the packet part received |
@@ -939,7 +940,7 @@ static void mkiss_receive_buf(struct tty_struct *tty, const unsigned char *cp, | |||
939 | ax_changedmtu(ax); | 940 | ax_changedmtu(ax); |
940 | 941 | ||
941 | /* Read the characters out of the buffer */ | 942 | /* Read the characters out of the buffer */ |
942 | while (count--) { | 943 | while (bytes--) { |
943 | if (fp != NULL && *fp++) { | 944 | if (fp != NULL && *fp++) { |
944 | if (!test_and_set_bit(AXF_ERROR, &ax->flags)) | 945 | if (!test_and_set_bit(AXF_ERROR, &ax->flags)) |
945 | ax->dev->stats.rx_errors++; | 946 | ax->dev->stats.rx_errors++; |
@@ -952,6 +953,8 @@ static void mkiss_receive_buf(struct tty_struct *tty, const unsigned char *cp, | |||
952 | 953 | ||
953 | mkiss_put(ax); | 954 | mkiss_put(ax); |
954 | tty_unthrottle(tty); | 955 | tty_unthrottle(tty); |
956 | |||
957 | return count; | ||
955 | } | 958 | } |
956 | 959 | ||
957 | /* | 960 | /* |