]> Pileus Git - ~andy/linux/blobdiff - drivers/serial/vr41xx_siu.c
Driver core: add device_rename function
[~andy/linux] / drivers / serial / vr41xx_siu.c
index bd6294132c18ff81f29d09bdaf48f86a6b14ecb1..6c8b0ea83c3c5b0318637526747c3dfee62a53f6 100644 (file)
@@ -19,7 +19,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/config.h>
 
 #if defined(CONFIG_SERIAL_VR41XX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #define SUPPORT_SYSRQ
@@ -39,6 +38,7 @@
 #include <linux/tty_flip.h>
 
 #include <asm/io.h>
+#include <asm/vr41xx/irq.h>
 #include <asm/vr41xx/siu.h>
 #include <asm/vr41xx/vr41xx.h>
 
@@ -821,25 +821,23 @@ static void wait_for_xmitr(struct uart_port *port)
        }
 }
 
+static void siu_console_putchar(struct uart_port *port, int ch)
+{
+       wait_for_xmitr(port);
+       siu_write(port, UART_TX, ch);
+}
+
 static void siu_console_write(struct console *con, const char *s, unsigned count)
 {
        struct uart_port *port;
        uint8_t ier;
-       unsigned i;
 
        port = &siu_uart_ports[con->index];
 
        ier = siu_read(port, UART_IER);
        siu_write(port, UART_IER, 0);
 
-       for (i = 0; i < count && *s != '\0'; i++, s++) {
-               wait_for_xmitr(port);
-               siu_write(port, UART_TX, *s);
-               if (*s == '\n') {
-                       wait_for_xmitr(port);
-                       siu_write(port, UART_TX, '\r');
-               }
-       }
+       uart_console_write(port, s, count, siu_console_putchar);
 
        wait_for_xmitr(port);
        siu_write(port, UART_IER, ier);
@@ -913,7 +911,6 @@ static struct uart_driver siu_uart_driver = {
        .owner          = THIS_MODULE,
        .driver_name    = "SIU",
        .dev_name       = "ttyVR",
-       .devfs_name     = "ttvr/",
        .major          = SIU_MAJOR,
        .minor          = SIU_MINOR_BASE,
        .cons           = SERIAL_VR41XX_CONSOLE,