diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-10-17 03:10:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-17 11:18:48 -0400 |
commit | 0d9ba869e103d91d471146378ad85bf1fb8e74b4 (patch) | |
tree | 9892fa0c36e9ac88ab6810a8b233426747a28423 /drivers/isdn/hysdn/hysdn_sched.c | |
parent | bd5349cfd2b9bbb10a3dbcd3fe5cbaabe0b2ab9e (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.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c index 1c0d54ac12ab..1fadf0133e9b 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) | |||
155 | if (card->debug_flags & LOG_SCHED_ASYN) | 155 | if (card->debug_flags & LOG_SCHED_ASYN) |
156 | hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1); | 156 | hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1); |
157 | 157 | ||
158 | save_flags(flags); | 158 | spin_lock_irqsave(&card->hysdn_lock, flags); |
159 | cli(); | ||
160 | while (card->async_busy) { | 159 | while (card->async_busy) { |
161 | sti(); | 160 | sti(); |
162 | 161 | ||
@@ -165,7 +164,7 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan) | |||
165 | 164 | ||
166 | msleep_interruptible(20); /* Timeout 20ms */ | 165 | msleep_interruptible(20); /* Timeout 20ms */ |
167 | if (!--cnt) { | 166 | if (!--cnt) { |
168 | restore_flags(flags); | 167 | spin_unlock_irqrestore(&card->hysdn_lock, flags); |
169 | return (-ERR_ASYNC_TIME); /* timed out */ | 168 | return (-ERR_ASYNC_TIME); /* timed out */ |
170 | } | 169 | } |
171 | cli(); | 170 | cli(); |
@@ -194,13 +193,13 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan) | |||
194 | 193 | ||
195 | msleep_interruptible(20); /* Timeout 20ms */ | 194 | msleep_interruptible(20); /* Timeout 20ms */ |
196 | if (!--cnt) { | 195 | if (!--cnt) { |
197 | restore_flags(flags); | 196 | spin_unlock_irqrestore(&card->hysdn_lock, flags); |
198 | return (-ERR_ASYNC_TIME); /* timed out */ | 197 | return (-ERR_ASYNC_TIME); /* timed out */ |
199 | } | 198 | } |
200 | cli(); | 199 | cli(); |
201 | } /* wait for buffer to become free again */ | 200 | } /* wait for buffer to become free again */ |
202 | 201 | ||
203 | restore_flags(flags); | 202 | spin_unlock_irqrestore(&card->hysdn_lock, flags); |
204 | 203 | ||
205 | if (card->debug_flags & LOG_SCHED_ASYN) | 204 | if (card->debug_flags & LOG_SCHED_ASYN) |
206 | hysdn_addlog(card, "async tx-cfg data send"); | 205 | hysdn_addlog(card, "async tx-cfg data send"); |