From 80321c3dfab9e85c078ba18752478204f9d20625 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 21 Sep 2006 16:23:19 +0200 Subject: [PATCH] --- yaml --- r: 36809 b: refs/heads/master c: 7785162cf2baf7c6c1e4ad8ae5888f85fcc5febc h: refs/heads/master i: 36807: 5eb766e63152d9c4f41de2c3baebe7e207ff7082 v: v3 --- [refs] | 2 +- trunk/drivers/bluetooth/hci_ldisc.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 01ab26f3065d..a771a3af7cd2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62ae15919b6db6644049338296624fbd724c0054 +refs/heads/master: 7785162cf2baf7c6c1e4ad8ae5888f85fcc5febc diff --git a/trunk/drivers/bluetooth/hci_ldisc.c b/trunk/drivers/bluetooth/hci_ldisc.c index 93ba25b7ea32..420b645c4c9f 100644 --- a/trunk/drivers/bluetooth/hci_ldisc.c +++ b/trunk/drivers/bluetooth/hci_ldisc.c @@ -241,15 +241,11 @@ static int hci_uart_send_frame(struct sk_buff *skb) static void hci_uart_destruct(struct hci_dev *hdev) { - struct hci_uart *hu; - if (!hdev) return; BT_DBG("%s", hdev->name); - - hu = (struct hci_uart *) hdev->driver_data; - kfree(hu); + kfree(hdev->driver_data); } /* ------ LDISC part ------ */ @@ -272,7 +268,7 @@ static int hci_uart_tty_open(struct tty_struct *tty) return -EEXIST; if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) { - BT_ERR("Can't allocate controll structure"); + BT_ERR("Can't allocate control structure"); return -ENFILE; } @@ -360,7 +356,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty) * * Return Value: None */ -static void hci_uart_tty_receive(struct tty_struct *tty, const __u8 *data, char *flags, int count) +static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *flags, int count) { struct hci_uart *hu = (void *)tty->disc_data; @@ -375,7 +371,8 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const __u8 *data, char hu->hdev->stat.byte_rx += count; spin_unlock(&hu->rx_lock); - if (test_and_clear_bit(TTY_THROTTLED,&tty->flags) && tty->driver->unthrottle) + if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) && + tty->driver->unthrottle) tty->driver->unthrottle(tty); }