aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio/riotty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/rio/riotty.c')
-rw-r--r--drivers/char/rio/riotty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c
index a4f0b1e3e7fa..cfa54361473f 100644
--- a/drivers/char/rio/riotty.c
+++ b/drivers/char/rio/riotty.c
@@ -319,6 +319,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
319 PortP->State |= RIO_WOPEN; 319 PortP->State |= RIO_WOPEN;
320 rio_spin_unlock_irqrestore(&PortP->portSem, flags); 320 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
321 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) { 321 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
322 rio_spin_lock_irqsave(&PortP->portSem, flags);
322 /* 323 /*
323 ** ACTION: verify that this is a good thing 324 ** ACTION: verify that this is a good thing
324 ** to do here. -- ??? 325 ** to do here. -- ???
@@ -334,6 +335,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
334 func_exit(); 335 func_exit();
335 return -EINTR; 336 return -EINTR;
336 } 337 }
338 rio_spin_lock_irqsave(&PortP->portSem, flags);
337 } 339 }
338 PortP->State &= ~RIO_WOPEN; 340 PortP->State &= ~RIO_WOPEN;
339 } 341 }
@@ -493,6 +495,7 @@ int riotclose(void *ptr)
493 495
494 if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) { 496 if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) {
495 RIOPreemptiveCmd(p, PortP, FCLOSE); 497 RIOPreemptiveCmd(p, PortP, FCLOSE);
498 rio_spin_lock_irqsave(&PortP->portSem, flags);
496 goto close_end; 499 goto close_end;
497 } 500 }
498 501
@@ -508,6 +511,7 @@ int riotclose(void *ptr)
508 511
509 if (p->RIOHalted) { 512 if (p->RIOHalted) {
510 RIOClearUp(PortP); 513 RIOClearUp(PortP);
514 rio_spin_lock_irqsave(&PortP->portSem, flags);
511 goto close_end; 515 goto close_end;
512 } 516 }
513 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) { 517 if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {