lkml.org 
[lkml]   [2007]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 07/12] pcmcia : Use mutex instead of semaphore in driver core
Signed-off-by: Dave Young <hidave.darkstar@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 ***************************/

\
 
 \ /
  Last update: 2007-12-29 02:11    [W:1.932 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site