aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/hysdn/hysdn_sched.c
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-10-17 00:10:36 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 08:18:48 -0700
commit0d9ba869e103d91d471146378ad85bf1fb8e74b4 (patch)
tree9892fa0c36e9ac88ab6810a8b233426747a28423 /drivers/isdn/hysdn/hysdn_sched.c
parentbd5349cfd2b9bbb10a3dbcd3fe5cbaabe0b2ab9e (diff)
[PATCH] drivers/isdn/hysdn: save_flags()/cli(), restore_flags() replaced appropriately
With Karsten Keil <kkeil@suse.de> save_flags()/cli() pair is replaced with spin_lock_irqsave() and restore_flags() replaced with spin_unlock_irqrestore() Tested compile only using allmodconfig Signed-off-by: Amol Lad <amol@verismonetworks.com> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hysdn/hysdn_sched.c')
-rw-r--r--drivers/isdn/hysdn/hysdn_sched.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c
index 1c0d54ac12a..1fadf0133e9 100644
--- a/drivers/isdn/hysdn/hysdn_sched.c
+++ b/drivers/isdn/hysdn/hysdn_sched.c
@@ -155,8 +155,7 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1);
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&card->hysdn_lock, flags);
while (card->async_busy) {
sti();
@@ -165,7 +164,7 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
msleep_interruptible(20); /* Timeout 20ms */
if (!--cnt) {
- restore_flags(flags);
+ spin_unlock_irqrestore(&card->hysdn_lock, flags);
return (-ERR_ASYNC_TIME); /* timed out */
}
cli();
@@ -194,13 +193,13 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
msleep_interruptible(20); /* Timeout 20ms */
if (!--cnt) {
- restore_flags(flags);
+ spin_unlock_irqrestore(&card->hysdn_lock, flags);
return (-ERR_ASYNC_TIME); /* timed out */
}
cli();
} /* wait for buffer to become free again */
- restore_flags(flags);
+ spin_unlock_irqrestore(&card->hysdn_lock, flags);
if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg data send");