Re: [PATCH] use spinlock instead of binary mutex in idt77252 driver

From: Satyam Sharma
Date: Sun Apr 22 2007 - 19:52:30 EST


On 4/23/07, Matthias Kaehlcke <matthias.kaehlcke@xxxxxxxxx> wrote:
use spinlock instead of binary mutex in idt77252 driver

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@xxxxxxxxx>

--

diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index b4b8014..e3cf141 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -2430,7 +2430,7 @@ idt77252_open(struct atm_vcc *vcc)

set_bit(ATM_VF_ADDR, &vcc->flags);

- down(&card->mutex);
+ mutex_lock(&card->mutex);

Note that you're actually replacing a semaphore with a mutex here (and
not a mutex with a spinlock). I guess that should be fine and
desirable as long as the semaphore was indeed being used a mutex
(binary) in this code.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/