summaryrefslogtreecommitdiff
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-26 01:37:14 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 08:56:55 -0800
commit14cc3e2b633bb64063698980974df4535368e98f (patch)
treed542c9db7376de199d640b8e34d5630460b217b5 /drivers/pnp/isapnp
parent353ab6e97b8f209dbecc9f650f1f84e3da2a7bb1 (diff)
[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/pnp/isapnp')
-rw-r--r--drivers/pnp/isapnp/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index b1b4b683cbdd..ac7c2bb6c69e 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -42,6 +42,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/isapnp.h>
+#include <linux/mutex.h>
#include <asm/io.h>
#if 0
@@ -92,7 +93,7 @@ MODULE_LICENSE("GPL");
#define _LTAG_FIXEDMEM32RANGE 0x86
static unsigned char isapnp_checksum_value;
-static DECLARE_MUTEX(isapnp_cfg_mutex);
+static DEFINE_MUTEX(isapnp_cfg_mutex);
static int isapnp_detected;
static int isapnp_csn_count;
@@ -903,7 +904,7 @@ int isapnp_cfg_begin(int csn, int logdev)
{
if (csn < 1 || csn > isapnp_csn_count || logdev > 10)
return -EINVAL;
- down(&isapnp_cfg_mutex);
+ mutex_lock(&isapnp_cfg_mutex);
isapnp_wait();
isapnp_key();
isapnp_wake(csn);
@@ -929,7 +930,7 @@ int isapnp_cfg_begin(int csn, int logdev)
int isapnp_cfg_end(void)
{
isapnp_wait();
- up(&isapnp_cfg_mutex);
+ mutex_unlock(&isapnp_cfg_mutex);
return 0;
}