Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[powerpc.git] / drivers / bluetooth / hci_ldisc.c
index 4a775f6..1994270 100644 (file)
@@ -23,7 +23,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include <linux/kernel.h>
@@ -272,15 +271,14 @@ static int hci_uart_tty_open(struct tty_struct *tty)
        if (hu)
                return -EEXIST;
 
-       if (!(hu = kmalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
+       if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
                BT_ERR("Can't allocate controll structure");
                return -ENFILE;
        }
 
-       memset(hu, 0, sizeof(struct hci_uart));
-
        tty->disc_data = hu;
        hu->tty = tty;
+       tty->receive_room = 65536;
 
        spin_lock_init(&hu->rx_lock);
 
@@ -350,20 +348,6 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
                hci_uart_tx_wakeup(hu);
 }
 
-/* hci_uart_tty_room()
- * 
- *    Callback function from tty driver. Return the amount of 
- *    space left in the receiver's buffer to decide if remote
- *    transmitter is to be throttled.
- *
- * Arguments:        tty    pointer to associated tty instance data
- * Return Value:    number of bytes left in receive buffer
- */
-static int hci_uart_tty_room (struct tty_struct *tty)
-{
-       return 65536;
-}
-
 /* hci_uart_tty_receive()
  * 
  *     Called by tty low level driver when receive data is
@@ -546,7 +530,6 @@ static int __init hci_uart_init(void)
        hci_uart_ldisc.write            = hci_uart_tty_write;
        hci_uart_ldisc.ioctl            = hci_uart_tty_ioctl;
        hci_uart_ldisc.poll             = hci_uart_tty_poll;
-       hci_uart_ldisc.receive_room     = hci_uart_tty_room;
        hci_uart_ldisc.receive_buf      = hci_uart_tty_receive;
        hci_uart_ldisc.write_wakeup     = hci_uart_tty_wakeup;
        hci_uart_ldisc.owner            = THIS_MODULE;