tty: Replace ASYNC_INITIALIZED bit and update atomically
[deliverable/linux.git] / drivers / char / pcmcia / synclink_cs.c
index bf54f4e23b6f86efea7b08f62378e03d683362d6..345ca7c7ea748c37d86becaafa2c701ffa26d0e6 100644 (file)
@@ -1272,7 +1272,7 @@ static int startup(MGSLPC_INFO * info, struct tty_struct *tty)
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):startup(%s)\n", __FILE__, __LINE__, info->device_name);
 
-       if (info->port.flags & ASYNC_INITIALIZED)
+       if (tty_port_initialized(&info->port))
                return 0;
 
        if (!info->tx_buf) {
@@ -1311,7 +1311,7 @@ static int startup(MGSLPC_INFO * info, struct tty_struct *tty)
        if (tty)
                clear_bit(TTY_IO_ERROR, &tty->flags);
 
-       info->port.flags |= ASYNC_INITIALIZED;
+       tty_port_set_initialized(&info->port, 1);
 
        return 0;
 }
@@ -1322,7 +1322,7 @@ static void shutdown(MGSLPC_INFO * info, struct tty_struct *tty)
 {
        unsigned long flags;
 
-       if (!(info->port.flags & ASYNC_INITIALIZED))
+       if (!tty_port_initialized(&info->port))
                return;
 
        if (debug_level >= DEBUG_LEVEL_INFO)
@@ -1361,7 +1361,7 @@ static void shutdown(MGSLPC_INFO * info, struct tty_struct *tty)
        if (tty)
                set_bit(TTY_IO_ERROR, &tty->flags);
 
-       info->port.flags &= ~ASYNC_INITIALIZED;
+       tty_port_set_initialized(&info->port, 0);
 }
 
 static void mgslpc_program_hw(MGSLPC_INFO *info, struct tty_struct *tty)
@@ -2338,7 +2338,7 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
        if (tty_port_close_start(port, tty, filp) == 0)
                goto cleanup;
 
-       if (port->flags & ASYNC_INITIALIZED)
+       if (tty_port_initialized(port))
                mgslpc_wait_until_sent(tty, info->timeout);
 
        mgslpc_flush_buffer(tty);
@@ -2371,7 +2371,7 @@ static void mgslpc_wait_until_sent(struct tty_struct *tty, int timeout)
        if (mgslpc_paranoia_check(info, tty->name, "mgslpc_wait_until_sent"))
                return;
 
-       if (!(info->port.flags & ASYNC_INITIALIZED))
+       if (!tty_port_initialized(&info->port))
                goto exit;
 
        orig_jiffies = jiffies;
This page took 0.041232 seconds and 5 git commands to generate.