[PATCH] isdn4linux: Siemens Gigaset drivers: mutex conversion
With Hansjoerg Lipp <hjlipp@web.de>
Convert the semaphores used by the Gigaset drivers to mutexes.
Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c
index 912fed6..8f124e8 100644
--- a/drivers/isdn/gigaset/proc.c
+++ b/drivers/isdn/gigaset/proc.c
@@ -37,14 +37,14 @@
if (value < 0 || value > 1)
return -EINVAL;
- if (down_interruptible(&cs->sem))
+ if (mutex_lock_interruptible(&cs->mutex))
return -ERESTARTSYS; // FIXME -EINTR?
cs->waiting = 1;
if (!gigaset_add_event(cs, &cs->at_state, EV_PROC_CIDMODE,
NULL, value, NULL)) {
cs->waiting = 0;
- up(&cs->sem);
+ mutex_unlock(&cs->mutex);
return -ENOMEM;
}
@@ -53,7 +53,7 @@
wait_event(cs->waitqueue, !cs->waiting);
- up(&cs->sem);
+ mutex_unlock(&cs->mutex);
return count;
}