projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
bluetooth
/
hci_ldisc.c
diff --git
a/drivers/bluetooth/hci_ldisc.c
b/drivers/bluetooth/hci_ldisc.c
index 320f71803a2b397f75c77a930dac1bd8de8f496d..b3f01996318f04c0f432a38112226dbbeba0efcf 100644
(file)
--- 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)
* flags pointer to flags for data
* count count of received data in bytes
*
* flags pointer to flags for data
* count count of received data in bytes
*
- * Return Value: N
one
+ * Return Value: N
umber of bytes received
*/
*/
-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;
struct hci_uart *hu = (void *)tty->disc_data;
+ int received;
if (!hu || tty != hu->tty)
if (!hu || tty != hu->tty)
- return;
+ return
-ENODEV
;
if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
- return;
+ return
-EINVAL
;
spin_lock(&hu->rx_lock);
spin_lock(&hu->rx_lock);
- re
t
= hu->proto->recv(hu, (void *) data, count);
- if (re
t
> 0)
- hu->hdev->stat.byte_rx +=
count
;
+ re
ceived
= hu->proto->recv(hu, (void *) data, count);
+ if (re
ceived
> 0)
+ hu->hdev->stat.byte_rx +=
received
;
spin_unlock(&hu->rx_lock);
tty_unthrottle(tty);
spin_unlock(&hu->rx_lock);
tty_unthrottle(tty);
+
+ return received;
}
static int hci_uart_register_dev(struct hci_uart *hu)
}
static int hci_uart_register_dev(struct hci_uart *hu)