[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20071229011307.GH2883@darkstar.te-china.tietoenator.com>
Date: Sat, 29 Dec 2007 09:13:07 +0800
From: Dave Young <hidave.darkstar@...il.com>
To: gregkh@...e.de
Cc: linux-pcmcia@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 07/12] pcmcia : Use mutex instead of semaphore in driver
core
Signed-off-by: Dave Young <hidave.darkstar@...il.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 ***************************/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists