summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pcmcia_ioctl.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-01-10 21:20:36 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:02:19 +0200
commit7fe908dd11e0c947bb72baa5b001d7abe5a420d5 (patch)
treedbd6db7a79476aee256a453f33bbe08c6b3a0cc1 /drivers/pcmcia/pcmcia_ioctl.c
parent[PATCH] pcmcia: remove unused defines (diff)
downloadlinux-7fe908dd11e0c947bb72baa5b001d7abe5a420d5.tar.xz
linux-7fe908dd11e0c947bb72baa5b001d7abe5a420d5.zip
[PATCH] pcmcia: use mutexes instead of semaphores
Use mutexes in the PCMICA core, as they suffice for what needs to be done. Includes a bugfix from and Signed-off-by Andrew Morton. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_ioctl.c')
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 56b625d171ae..8eceba739102 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -269,9 +269,9 @@ rescan:
/*
* Prevent this racing with a card insertion.
*/
- down(&s->skt_sem);
+ mutex_lock(&s->skt_mutex);
bus_rescan_devices(&pcmcia_bus_type);
- up(&s->skt_sem);
+ mutex_unlock(&s->skt_mutex);
/* check whether the driver indeed matched. I don't care if this
* is racy or not, because it can only happen on cardmgr access
@@ -606,9 +606,9 @@ static int ds_ioctl(struct inode * inode, struct file * file,
}
break;
case DS_GET_FIRST_TUPLE:
- down(&s->skt_sem);
+ mutex_lock(&s->skt_mutex);
pcmcia_validate_mem(s);
- up(&s->skt_sem);
+ mutex_unlock(&s->skt_mutex);
ret = pccard_get_first_tuple(s, BIND_FN_ALL, &buf->tuple);
break;
case DS_GET_NEXT_TUPLE:
@@ -637,9 +637,9 @@ static int ds_ioctl(struct inode * inode, struct file * file,
}
break;
case DS_VALIDATE_CIS:
- down(&s->skt_sem);
+ mutex_lock(&s->skt_mutex);
pcmcia_validate_mem(s);
- up(&s->skt_sem);
+ mutex_unlock(&s->skt_mutex);
ret = pccard_validate_cis(s, BIND_FN_ALL, &buf->cisinfo);
break;
case DS_SUSPEND_CARD: