VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / char / generic_serial.c
index 1f278a4..1027eb7 100644 (file)
@@ -45,7 +45,7 @@ static int gs_debug;
 #define func_enter() gs_dprintk (GS_DEBUG_FLOW, "gs: enter %s\n", __FUNCTION__)
 #define func_exit()  gs_dprintk (GS_DEBUG_FLOW, "gs: exit  %s\n", __FUNCTION__)
 
-#if NEW_WRITE_LOCKING
+#ifdef NEW_WRITE_LOCKING
 #define DECL      /* Nothing */
 #define LOCKIT    down (& port->port_write_sem);
 #define RELEASEIT up (&port->port_write_sem);
@@ -526,7 +526,7 @@ void gs_shutdown_port (struct gs_port *port)
 
        if (port->xmit_buf) {
                free_page((unsigned long) port->xmit_buf);
-               port->xmit_buf = 0;
+               port->xmit_buf = NULL;
        }
 
        if (port->tty)
@@ -767,7 +767,7 @@ void gs_close(struct tty_struct * tty, struct file * filp)
        port->event = 0;
        port->rd->close (port);
        port->rd->shutdown_port (port);
-       port->tty = 0;
+       port->tty = NULL;
 
        if (port->blocked_open) {
                if (port->close_delay) {
@@ -967,7 +967,7 @@ int gs_init_port(struct gs_port *port)
 }
 
 
-int gs_setserial(struct gs_port *port, struct serial_struct *sp)
+int gs_setserial(struct gs_port *port, struct serial_struct __user *sp)
 {
        struct serial_struct sio;
 
@@ -1002,7 +1002,7 @@ int gs_setserial(struct gs_port *port, struct serial_struct *sp)
  *      Generate the serial struct info.
  */
 
-int gs_getserial(struct gs_port *port, struct serial_struct *sp)
+int gs_getserial(struct gs_port *port, struct serial_struct __user *sp)
 {
        struct serial_struct    sio;