linux-next: manual merge of the tty tree with the bluetooth tree

From: Stephen Rothwell
Date: Tue Apr 26 2011 - 03:55:46 EST


Hi Greg,

Today's linux-next merge of the tty tree got a conflict in
drivers/bluetooth/hci_ldisc.c between commit 78b4a56c28c0 ("Bluetooth:
hci_uart: check the return value of recv()") from the bluetooth tree and
commit b1c43f82c5aa ("tty: make receive_buf() return the amout of bytes
received") from the tty tree.

I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/bluetooth/hci_ldisc.c
index 320f718,0d4da5e..0000000
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@@ -357,21 -357,21 +357,22 @@@ static void hci_uart_tty_wakeup(struct
*
* Return Value: None
*/
- static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *flags, int count)
+ static unsigned int hci_uart_tty_receive(struct tty_struct *tty,
+ const u8 *data, char *flags, int count)
{
- int ret;
struct hci_uart *hu = (void *)tty->disc_data;
+ int received;

if (!hu || tty != hu->tty)
- return;
+ return -ENODEV;

if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
- return;
+ return -EINVAL;

spin_lock(&hu->rx_lock);
- ret = hu->proto->recv(hu, (void *) data, count);
- if (ret > 0)
+ received = hu->proto->recv(hu, (void *) data, count);
- hu->hdev->stat.byte_rx += count;
++ if (received > 0)
+ hu->hdev->stat.byte_rx += count;
spin_unlock(&hu->rx_lock);

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