netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 4/5] bluetooth: small cleanups
@ 2006-09-20  1:08 akpm
  2006-09-20  6:49 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2006-09-20  1:08 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, pavel, marcel

From: Pavel Machek <pavel@suse.cz>

This cleans up bluetooth a bit, no code changes.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/bluetooth/hci_ldisc.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff -puN drivers/bluetooth/hci_ldisc.c~bluetooth-small-cleanups drivers/bluetooth/hci_ldisc.c
--- a/drivers/bluetooth/hci_ldisc.c~bluetooth-small-cleanups
+++ a/drivers/bluetooth/hci_ldisc.c
@@ -241,15 +241,11 @@ static int hci_uart_send_frame(struct sk
 
 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_
 		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 t
  *     
  * 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 
 	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);
 }
 
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 4/5] bluetooth: small cleanups
  2006-09-20  1:08 [patch 4/5] bluetooth: small cleanups akpm
@ 2006-09-20  6:49 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2006-09-20  6:49 UTC (permalink / raw)
  To: akpm; +Cc: davem, netdev, pavel

Hi Andrew,

> From: Pavel Machek <pavel@suse.cz>
> 
> This cleans up bluetooth a bit, no code changes.

NAK on this one. These cleanups will come with my other pending
cleanups.

Regards

Marcel



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-20  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-20  1:08 [patch 4/5] bluetooth: small cleanups akpm
2006-09-20  6:49 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).