[PATCH 07/12] pcmcia : Use mutex instead of semaphore in drivercore

From: Dave Young
Date: Fri Dec 28 2007 - 20:09:32 EST


Signed-off-by: Dave Young <hidave.darkstar@xxxxxxxxx>

---
drivers/pcmcia/ds.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff -upr linux/drivers/pcmcia/ds.c linux.new/drivers/pcmcia/ds.c
--- linux/drivers/pcmcia/ds.c 2007-12-28 10:31:52.000000000 +0800
+++ linux.new/drivers/pcmcia/ds.c 2007-12-28 10:33:14.000000000 +0800
@@ -1119,9 +1119,9 @@ static int runtime_suspend(struct device
{
int rc;

- down(&dev->sem);
+ mutex_lock(&dev->mutex);
rc = pcmcia_dev_suspend(dev, PMSG_SUSPEND);
- up(&dev->sem);
+ mutex_unlock(&dev->mutex);
return rc;
}

@@ -1129,9 +1129,9 @@ static void runtime_resume(struct device
{
int rc;

- down(&dev->sem);
+ mutex_lock(&dev->mutex);
rc = pcmcia_dev_resume(dev);
- up(&dev->sem);
+ mutex_unlock(&dev->mutex);
}

/************************ per-device sysfs output ***************************/
--
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/