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/bluetooth | |
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/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 320f71803a2b..b3f01996318f 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -355,26 +355,29 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty) | |||
355 | * flags pointer to flags for data | 355 | * flags pointer to flags for data |
356 | * count count of received data in bytes | 356 | * count count of received data in bytes |
357 | * | 357 | * |
358 | * Return Value: None | 358 | * Return Value: Number of bytes received |
359 | */ | 359 | */ |
360 | static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *flags, int count) | 360 | static unsigned int hci_uart_tty_receive(struct tty_struct *tty, |
361 | const u8 *data, char *flags, int count) | ||
361 | { | 362 | { |
362 | int ret; | ||
363 | struct hci_uart *hu = (void *)tty->disc_data; | 363 | struct hci_uart *hu = (void *)tty->disc_data; |
364 | int received; | ||
364 | 365 | ||
365 | if (!hu || tty != hu->tty) | 366 | if (!hu || tty != hu->tty) |
366 | return; | 367 | return -ENODEV; |
367 | 368 | ||
368 | if (!test_bit(HCI_UART_PROTO_SET, &hu->flags)) | 369 | if (!test_bit(HCI_UART_PROTO_SET, &hu->flags)) |
369 | return; | 370 | return -EINVAL; |
370 | 371 | ||
371 | spin_lock(&hu->rx_lock); | 372 | spin_lock(&hu->rx_lock); |
372 | ret = hu->proto->recv(hu, (void *) data, count); | 373 | received = hu->proto->recv(hu, (void *) data, count); |
373 | if (ret > 0) | 374 | if (received > 0) |
374 | hu->hdev->stat.byte_rx += count; | 375 | hu->hdev->stat.byte_rx += received; |
375 | spin_unlock(&hu->rx_lock); | 376 | spin_unlock(&hu->rx_lock); |
376 | 377 | ||
377 | tty_unthrottle(tty); | 378 | tty_unthrottle(tty); |
379 | |||
380 | return received; | ||
378 | } | 381 | } |
379 | 382 | ||
380 | static int hci_uart_register_dev(struct hci_uart *hu) | 383 | static int hci_uart_register_dev(struct hci_uart *hu) |