git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
bluetooth
/
hci_ldisc.c
diff --git
a/drivers/bluetooth/hci_ldisc.c
b/drivers/bluetooth/hci_ldisc.c
index
613673b
..
420b645
100644
(file)
--- a/
drivers/bluetooth/hci_ldisc.c
+++ b/
drivers/bluetooth/hci_ldisc.c
@@
-23,7
+23,6
@@
*
*/
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@
-192,7
+191,7
@@
static int hci_uart_flush(struct hci_dev *hdev)
/* Flush any pending characters in the driver and discipline. */
tty_ldisc_flush(tty);
/* Flush any pending characters in the driver and discipline. */
tty_ldisc_flush(tty);
- if (tty->driver->flush_buffer)
+ if (tty->driver
&& tty->driver
->flush_buffer)
tty->driver->flush_buffer(tty);
if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
tty->driver->flush_buffer(tty);
if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
@@
-242,15
+241,11
@@
static int hci_uart_send_frame(struct sk_buff *skb)
static void hci_uart_destruct(struct hci_dev *hdev)
{
static void hci_uart_destruct(struct hci_dev *hdev)
{
- struct hci_uart *hu;
-
if (!hdev)
return;
BT_DBG("%s", hdev->name);
if (!hdev)
return;
BT_DBG("%s", hdev->name);
-
- hu = (struct hci_uart *) hdev->driver_data;
- kfree(hu);
+ kfree(hdev->driver_data);
}
/* ------ LDISC part ------ */
}
/* ------ LDISC part ------ */
@@
-273,7
+268,7
@@
static int hci_uart_tty_open(struct tty_struct *tty)
return -EEXIST;
if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
return -EEXIST;
if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
- BT_ERR("Can't allocate control
l
structure");
+ BT_ERR("Can't allocate control structure");
return -ENFILE;
}
return -ENFILE;
}
@@
-291,7
+286,7
@@
static int hci_uart_tty_open(struct tty_struct *tty)
if (tty->ldisc.flush_buffer)
tty->ldisc.flush_buffer(tty);
if (tty->ldisc.flush_buffer)
tty->ldisc.flush_buffer(tty);
- if (tty->driver->flush_buffer)
+ if (tty->driver
&& tty->driver
->flush_buffer)
tty->driver->flush_buffer(tty);
return 0;
tty->driver->flush_buffer(tty);
return 0;
@@
-361,7
+356,7
@@
static void hci_uart_tty_wakeup(struct tty_struct *tty)
*
* Return Value: None
*/
*
* 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;
{
struct hci_uart *hu = (void *)tty->disc_data;
@@
-376,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);
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);
}
tty->driver->unthrottle(tty);
}