diff options
Diffstat (limited to 'drivers/tty/synclink_gt.c')
| -rw-r--r-- | drivers/tty/synclink_gt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index 333652a8896a..82c98b820335 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c | |||
| @@ -726,7 +726,7 @@ static void close(struct tty_struct *tty, struct file *filp) | |||
| 726 | goto cleanup; | 726 | goto cleanup; |
| 727 | 727 | ||
| 728 | mutex_lock(&info->port.mutex); | 728 | mutex_lock(&info->port.mutex); |
| 729 | if (info->port.flags & ASYNC_INITIALIZED) | 729 | if (tty_port_initialized(&info->port)) |
| 730 | wait_until_sent(tty, info->timeout); | 730 | wait_until_sent(tty, info->timeout); |
| 731 | flush_buffer(tty); | 731 | flush_buffer(tty); |
| 732 | tty_ldisc_flush(tty); | 732 | tty_ldisc_flush(tty); |
| @@ -893,7 +893,7 @@ static void wait_until_sent(struct tty_struct *tty, int timeout) | |||
| 893 | if (sanity_check(info, tty->name, "wait_until_sent")) | 893 | if (sanity_check(info, tty->name, "wait_until_sent")) |
| 894 | return; | 894 | return; |
| 895 | DBGINFO(("%s wait_until_sent entry\n", info->device_name)); | 895 | DBGINFO(("%s wait_until_sent entry\n", info->device_name)); |
| 896 | if (!(info->port.flags & ASYNC_INITIALIZED)) | 896 | if (!tty_port_initialized(&info->port)) |
| 897 | goto exit; | 897 | goto exit; |
| 898 | 898 | ||
| 899 | orig_jiffies = jiffies; | 899 | orig_jiffies = jiffies; |
| @@ -2421,7 +2421,7 @@ static int startup(struct slgt_info *info) | |||
| 2421 | { | 2421 | { |
| 2422 | DBGINFO(("%s startup\n", info->device_name)); | 2422 | DBGINFO(("%s startup\n", info->device_name)); |
| 2423 | 2423 | ||
| 2424 | if (info->port.flags & ASYNC_INITIALIZED) | 2424 | if (tty_port_initialized(&info->port)) |
| 2425 | return 0; | 2425 | return 0; |
| 2426 | 2426 | ||
| 2427 | if (!info->tx_buf) { | 2427 | if (!info->tx_buf) { |
| @@ -2442,7 +2442,7 @@ static int startup(struct slgt_info *info) | |||
| 2442 | if (info->port.tty) | 2442 | if (info->port.tty) |
| 2443 | clear_bit(TTY_IO_ERROR, &info->port.tty->flags); | 2443 | clear_bit(TTY_IO_ERROR, &info->port.tty->flags); |
| 2444 | 2444 | ||
| 2445 | info->port.flags |= ASYNC_INITIALIZED; | 2445 | tty_port_set_initialized(&info->port, 1); |
| 2446 | 2446 | ||
| 2447 | return 0; | 2447 | return 0; |
| 2448 | } | 2448 | } |
| @@ -2454,7 +2454,7 @@ static void shutdown(struct slgt_info *info) | |||
| 2454 | { | 2454 | { |
| 2455 | unsigned long flags; | 2455 | unsigned long flags; |
| 2456 | 2456 | ||
| 2457 | if (!(info->port.flags & ASYNC_INITIALIZED)) | 2457 | if (!tty_port_initialized(&info->port)) |
| 2458 | return; | 2458 | return; |
| 2459 | 2459 | ||
| 2460 | DBGINFO(("%s shutdown\n", info->device_name)); | 2460 | DBGINFO(("%s shutdown\n", info->device_name)); |
| @@ -2489,7 +2489,7 @@ static void shutdown(struct slgt_info *info) | |||
| 2489 | if (info->port.tty) | 2489 | if (info->port.tty) |
| 2490 | set_bit(TTY_IO_ERROR, &info->port.tty->flags); | 2490 | set_bit(TTY_IO_ERROR, &info->port.tty->flags); |
| 2491 | 2491 | ||
| 2492 | info->port.flags &= ~ASYNC_INITIALIZED; | 2492 | tty_port_set_initialized(&info->port, 0); |
| 2493 | } | 2493 | } |
| 2494 | 2494 | ||
| 2495 | static void program_hw(struct slgt_info *info) | 2495 | static void program_hw(struct slgt_info *info) |
| @@ -3287,12 +3287,12 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp, | |||
| 3287 | port->blocked_open++; | 3287 | port->blocked_open++; |
| 3288 | 3288 | ||
| 3289 | while (1) { | 3289 | while (1) { |
| 3290 | if (C_BAUD(tty) && test_bit(ASYNCB_INITIALIZED, &port->flags)) | 3290 | if (C_BAUD(tty) && tty_port_initialized(port)) |
| 3291 | tty_port_raise_dtr_rts(port); | 3291 | tty_port_raise_dtr_rts(port); |
| 3292 | 3292 | ||
| 3293 | set_current_state(TASK_INTERRUPTIBLE); | 3293 | set_current_state(TASK_INTERRUPTIBLE); |
| 3294 | 3294 | ||
| 3295 | if (tty_hung_up_p(filp) || !(port->flags & ASYNC_INITIALIZED)){ | 3295 | if (tty_hung_up_p(filp) || !tty_port_initialized(port)) { |
| 3296 | retval = (port->flags & ASYNC_HUP_NOTIFY) ? | 3296 | retval = (port->flags & ASYNC_HUP_NOTIFY) ? |
| 3297 | -EAGAIN : -ERESTARTSYS; | 3297 | -EAGAIN : -ERESTARTSYS; |
| 3298 | break; | 3298 | break; |
