vserver 1.9.3
[linux-2.6.git] / drivers / bluetooth / hci_ldisc.c
index 5964684..fb990ec 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sched.h>
@@ -189,9 +188,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
        }
 
        /* Flush any pending characters in the driver and discipline. */
-       if (tty->ldisc.flush_buffer)
-               tty->ldisc.flush_buffer(tty);
-
+       tty_ldisc_flush(tty);
        if (tty->driver->flush_buffer)
                tty->driver->flush_buffer(tty);
 
@@ -281,7 +278,9 @@ static int hci_uart_tty_open(struct tty_struct *tty)
 
        spin_lock_init(&hu->rx_lock);
 
-       /* Flush any pending characters in the driver and line discipline */
+       /* Flush any pending characters in the driver and line discipline. */
+       /* FIXME: why is this needed. Note don't use ldisc_ref here as the
+          open path is before the ldisc is referencable */
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
@@ -499,11 +498,11 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file * file,
 /*
  * We don't provide read/write/poll interface for user space.
  */
-static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file, unsigned char *buf, size_t nr)
+static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file, unsigned char __user *buf, size_t nr)
 {
        return 0;
 }
-static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file, const unsigned char *data, size_t count)
+static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file, const unsigned char __user *data, size_t count)
 {
        return 0;
 }