diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-03-26 01:37:14 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 08:56:55 -0800 |
commit | 14cc3e2b633bb64063698980974df4535368e98f (patch) | |
tree | d542c9db7376de199d640b8e34d5630460b217b5 /drivers/pci/hotplug/rpadlpar_core.c | |
parent | 353ab6e97b8f209dbecc9f650f1f84e3da2a7bb1 (diff) | |
download | blackbird-obmc-linux-14cc3e2b633bb64063698980974df4535368e98f.tar.gz blackbird-obmc-linux-14cc3e2b633bb64063698980974df4535368e98f.zip |
[PATCH] sem2mutex: misc static one-file mutexes
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jens Axboe <axboe@suse.de>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Cc: Greg KH <greg@kroah.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci/hotplug/rpadlpar_core.c')
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index 3eefe2cec72d..46825fee3ae4 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c @@ -19,7 +19,7 @@ #include <linux/string.h> #include <asm/pci-bridge.h> -#include <asm/semaphore.h> +#include <linux/mutex.h> #include <asm/rtas.h> #include <asm/vio.h> @@ -27,7 +27,7 @@ #include "rpaphp.h" #include "rpadlpar.h" -static DECLARE_MUTEX(rpadlpar_sem); +static DEFINE_MUTEX(rpadlpar_mutex); #define DLPAR_MODULE_NAME "rpadlpar_io" @@ -300,7 +300,7 @@ int dlpar_add_slot(char *drc_name) int node_type; int rc = -EIO; - if (down_interruptible(&rpadlpar_sem)) + if (mutex_lock_interruptible(&rpadlpar_mutex)) return -ERESTARTSYS; /* Find newly added node */ @@ -324,7 +324,7 @@ int dlpar_add_slot(char *drc_name) printk(KERN_INFO "%s: slot %s added\n", DLPAR_MODULE_NAME, drc_name); exit: - up(&rpadlpar_sem); + mutex_unlock(&rpadlpar_mutex); return rc; } @@ -417,7 +417,7 @@ int dlpar_remove_slot(char *drc_name) int node_type; int rc = 0; - if (down_interruptible(&rpadlpar_sem)) + if (mutex_lock_interruptible(&rpadlpar_mutex)) return -ERESTARTSYS; dn = find_dlpar_node(drc_name, &node_type); @@ -439,7 +439,7 @@ int dlpar_remove_slot(char *drc_name) } printk(KERN_INFO "%s: slot %s removed\n", DLPAR_MODULE_NAME, drc_name); exit: - up(&rpadlpar_sem); + mutex_unlock(&rpadlpar_mutex); return rc; } |