Merge ../linux-2.6-watchdog-mm
[linux-drm-fsl-dcu.git] / arch / um / drivers / port_user.c
index ed4a1a6c5d83fa03fb515f69a2fc30340f596301..bc6afaf74c1a8123ace69f94c5d2d9a340bc6347 100644 (file)
@@ -19,6 +19,7 @@
 #include "chan_user.h"
 #include "port.h"
 #include "os.h"
+#include "um_malloc.h"
 
 struct port_chan {
        int raw;
@@ -27,7 +28,7 @@ struct port_chan {
        char dev[sizeof("32768\0")];
 };
 
-static void *port_init(char *str, int device, struct chan_opts *opts)
+static void *port_init(char *str, int device, const struct chan_opts *opts)
 {
        struct port_chan *data;
        void *kern_data;
@@ -100,21 +101,14 @@ static void port_close(int fd, void *d)
        os_close_file(fd);
 }
 
-static int port_console_write(int fd, const char *buf, int n, void *d)
-{
-       struct port_chan *data = d;
-
-       return(generic_console_write(fd, buf, n, &data->tt));
-}
-
-struct chan_ops port_ops = {
+const struct chan_ops port_ops = {
        .type           = "port",
        .init           = port_init,
        .open           = port_open,
        .close          = port_close,
        .read           = generic_read,
        .write          = generic_write,
-       .console_write  = port_console_write,
+       .console_write  = generic_console_write,
        .window_size    = generic_window_size,
        .free           = port_free,
        .winch          = 1,