[PATCH 07/12] pcmcia : Use mutex instead of semaphore in driver core
Dave Young
hidave.darkstar at gmail.com
Fri Dec 28 20:13:07 EST 2007
Signed-off-by: Dave Young <hidave.darkstar at gmail.com>
---
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 ***************************/
More information about the linux-pcmcia
mailing list