aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio/riotty.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-04-02 16:04:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-02 18:28:19 -0400
commit212e7bb6cda5dd3c4ad97a7aedef705028ced4ad (patch)
treef2257e37b2bd8e10c25be610c1648f627efaf525 /drivers/char/rio/riotty.c
parent3d0ae36ea973b42e1c636210433aebef4426c5bf (diff)
Char: rio, fix sparse warnings
Add some locks and unlocks to some code paths. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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) {