diff options
-rw-r--r-- | drivers/char/rio/riotty.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c index db655002671f..78a321afdf4f 100644 --- a/drivers/char/rio/riotty.c +++ b/drivers/char/rio/riotty.c | |||
@@ -524,16 +524,16 @@ riotclose(void *ptr) | |||
524 | register uint SysPort = dev; | 524 | register uint SysPort = dev; |
525 | struct ttystatics *tp; /* pointer to our ttystruct */ | 525 | struct ttystatics *tp; /* pointer to our ttystruct */ |
526 | #endif | 526 | #endif |
527 | struct Port *PortP =ptr; /* pointer to the port structure */ | 527 | struct Port *PortP = ptr; /* pointer to the port structure */ |
528 | int deleted = 0; | 528 | int deleted = 0; |
529 | int try = -1; /* Disable the timeouts by setting them to -1 */ | 529 | int try = -1; /* Disable the timeouts by setting them to -1 */ |
530 | int repeat_this = -1; /* Congrats to those having 15 years of | 530 | int repeat_this = -1; /* Congrats to those having 15 years of |
531 | uptime! (You get to break the driver.) */ | 531 | uptime! (You get to break the driver.) */ |
532 | long end_time; | 532 | unsigned long end_time; |
533 | struct tty_struct * tty; | 533 | struct tty_struct * tty; |
534 | unsigned long flags; | 534 | unsigned long flags; |
535 | int Modem; | 535 | int Modem; |
536 | int rv =0; | 536 | int rv = 0; |
537 | 537 | ||
538 | rio_dprintk (RIO_DEBUG_TTY, "port close SysPort %d\n",PortP->PortNum); | 538 | rio_dprintk (RIO_DEBUG_TTY, "port close SysPort %d\n",PortP->PortNum); |
539 | 539 | ||
@@ -620,7 +620,7 @@ riotclose(void *ptr) | |||
620 | if (repeat_this -- <= 0) { | 620 | if (repeat_this -- <= 0) { |
621 | rv = -EINTR; | 621 | rv = -EINTR; |
622 | rio_dprintk (RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); | 622 | rio_dprintk (RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); |
623 | RIOPreemptiveCmd(p, PortP, FCLOSE ); | 623 | RIOPreemptiveCmd(p, PortP, FCLOSE); |
624 | goto close_end; | 624 | goto close_end; |
625 | } | 625 | } |
626 | rio_dprintk (RIO_DEBUG_TTY, "Calling timeout to flush in closing\n"); | 626 | rio_dprintk (RIO_DEBUG_TTY, "Calling timeout to flush in closing\n"); |
@@ -656,14 +656,12 @@ riotclose(void *ptr) | |||
656 | goto close_end; | 656 | goto close_end; |
657 | } | 657 | } |
658 | 658 | ||
659 | |||
660 | |||
661 | /* Can't call RIOShortCommand with the port locked. */ | 659 | /* Can't call RIOShortCommand with the port locked. */ |
662 | rio_spin_unlock_irqrestore(&PortP->portSem, flags); | 660 | rio_spin_unlock_irqrestore(&PortP->portSem, flags); |
663 | 661 | ||
664 | if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) { | 662 | if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) { |
665 | RIOPreemptiveCmd(p, PortP,FCLOSE); | 663 | RIOPreemptiveCmd(p, PortP, FCLOSE); |
666 | goto close_end; | 664 | goto close_end; |
667 | } | 665 | } |
668 | 666 | ||
669 | if (!deleted) | 667 | if (!deleted) |
@@ -698,7 +696,6 @@ riotclose(void *ptr) | |||
698 | */ | 696 | */ |
699 | PortP->Config &= ~(RIO_CTSFLOW|RIO_RTSFLOW); | 697 | PortP->Config &= ~(RIO_CTSFLOW|RIO_RTSFLOW); |
700 | 698 | ||
701 | |||
702 | #ifdef STATS | 699 | #ifdef STATS |
703 | PortP->Stat.CloseCnt++; | 700 | PortP->Stat.CloseCnt++; |
704 | #endif | 701 | #endif |