diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-10 15:20:36 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:02:19 -0500 |
commit | 7fe908dd11e0c947bb72baa5b001d7abe5a420d5 (patch) | |
tree | dbd6db7a79476aee256a453f33bbe08c6b3a0cc1 /drivers/pcmcia/pcmcia_ioctl.c | |
parent | cbbddd1046d44d90d31c7f246ed0207117602b89 (diff) |
[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.c | 12 |
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: | |||
269 | /* | 269 | /* |
270 | * Prevent this racing with a card insertion. | 270 | * Prevent this racing with a card insertion. |
271 | */ | 271 | */ |
272 | down(&s->skt_sem); | 272 | mutex_lock(&s->skt_mutex); |
273 | bus_rescan_devices(&pcmcia_bus_type); | 273 | bus_rescan_devices(&pcmcia_bus_type); |
274 | up(&s->skt_sem); | 274 | mutex_unlock(&s->skt_mutex); |
275 | 275 | ||
276 | /* check whether the driver indeed matched. I don't care if this | 276 | /* check whether the driver indeed matched. I don't care if this |
277 | * is racy or not, because it can only happen on cardmgr access | 277 | * 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, | |||
606 | } | 606 | } |
607 | break; | 607 | break; |
608 | case DS_GET_FIRST_TUPLE: | 608 | case DS_GET_FIRST_TUPLE: |
609 | down(&s->skt_sem); | 609 | mutex_lock(&s->skt_mutex); |
610 | pcmcia_validate_mem(s); | 610 | pcmcia_validate_mem(s); |
611 | up(&s->skt_sem); | 611 | mutex_unlock(&s->skt_mutex); |
612 | ret = pccard_get_first_tuple(s, BIND_FN_ALL, &buf->tuple); | 612 | ret = pccard_get_first_tuple(s, BIND_FN_ALL, &buf->tuple); |
613 | break; | 613 | break; |
614 | case DS_GET_NEXT_TUPLE: | 614 | case DS_GET_NEXT_TUPLE: |
@@ -637,9 +637,9 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
637 | } | 637 | } |
638 | break; | 638 | break; |
639 | case DS_VALIDATE_CIS: | 639 | case DS_VALIDATE_CIS: |
640 | down(&s->skt_sem); | 640 | mutex_lock(&s->skt_mutex); |
641 | pcmcia_validate_mem(s); | 641 | pcmcia_validate_mem(s); |
642 | up(&s->skt_sem); | 642 | mutex_unlock(&s->skt_mutex); |
643 | ret = pccard_validate_cis(s, BIND_FN_ALL, &buf->cisinfo); | 643 | ret = pccard_validate_cis(s, BIND_FN_ALL, &buf->cisinfo); |
644 | break; | 644 | break; |
645 | case DS_SUSPEND_CARD: | 645 | case DS_SUSPEND_CARD: |