upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / drivers / tc / zs.c
index c5befc9..a8c4d11 100644 (file)
@@ -55,6 +55,7 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/bitops.h>
 #ifdef CONFIG_SERIAL_CONSOLE
 #include <linux/console.h>
 #endif
@@ -63,7 +64,6 @@
 #include <asm/pgtable.h>
 #include <asm/irq.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 #include <asm/wbflush.h>
 #include <asm/bootinfo.h>
@@ -927,7 +927,7 @@ static void rs_flush_chars(struct tty_struct *tty)
        restore_flags(flags);
 }
 
-static int rs_write(struct tty_struct * tty, int from_user,
+static int rs_write(struct tty_struct * tty,
                    const unsigned char *buf, int count)
 {
        int     c, total = 0;
@@ -948,15 +948,7 @@ static int rs_write(struct tty_struct * tty, int from_user,
                if (c <= 0)
                        break;
 
-               if (from_user) {
-                       down(&tmp_buf_sem);
-                       copy_from_user(tmp_buf, buf, c);
-                       c = min_t(int, c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
-                                             SERIAL_XMIT_SIZE - info->xmit_head));
-                       memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
-                       up(&tmp_buf_sem);
-               } else
-                       memcpy(info->xmit_buf + info->xmit_head, buf, c);
+               memcpy(info->xmit_buf + info->xmit_head, buf, c);
                info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
                info->xmit_cnt += c;
                restore_flags(flags);