diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 10:49:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 10:49:54 -0700 |
commit | c37927d4359e81b85de644f8fb08878717cf5f3f (patch) | |
tree | 25dabf2d905e1410819d1bdaba0bf5f779100d3c /drivers/char/ipmi | |
parent | 5704e44d283e907623e3775c1262f206a2c48cf3 (diff) | |
parent | 2a48fc0ab24241755dc93bfd4f01d68efab47f5a (diff) |
Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
block: autoconvert trivial BKL users to private mutex
drivers: autoconvert trivial BKL users to private mutex
ipmi: autoconvert trivial BKL users to private mutex
mac: autoconvert trivial BKL users to private mutex
mtd: autoconvert trivial BKL users to private mutex
scsi: autoconvert trivial BKL users to private mutex
Fix up trivial conflicts (due to addition of private mutex right next to
deletion of a version string) in drivers/char/pcmcia/cm40[04]0_cs.c
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r-- | drivers/char/ipmi/ipmi_devintf.c | 14 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index d8ec92a38980..44833de47728 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c @@ -44,7 +44,6 @@ #include <linux/init.h> #include <linux/device.h> #include <linux/compat.h> -#include <linux/smp_lock.h> struct ipmi_file_private { @@ -59,6 +58,7 @@ struct ipmi_file_private unsigned int default_retry_time_ms; }; +static DEFINE_MUTEX(ipmi_mutex); static void file_receive_handler(struct ipmi_recv_msg *msg, void *handler_data) { @@ -102,9 +102,9 @@ static int ipmi_fasync(int fd, struct file *file, int on) struct ipmi_file_private *priv = file->private_data; int result; - lock_kernel(); /* could race against open() otherwise */ + mutex_lock(&ipmi_mutex); /* could race against open() otherwise */ result = fasync_helper(fd, file, on, &priv->fasync_queue); - unlock_kernel(); + mutex_unlock(&ipmi_mutex); return (result); } @@ -125,7 +125,7 @@ static int ipmi_open(struct inode *inode, struct file *file) if (!priv) return -ENOMEM; - lock_kernel(); + mutex_lock(&ipmi_mutex); priv->file = file; rv = ipmi_create_user(if_num, @@ -150,7 +150,7 @@ static int ipmi_open(struct inode *inode, struct file *file) priv->default_retry_time_ms = 0; out: - unlock_kernel(); + mutex_unlock(&ipmi_mutex); return rv; } @@ -639,9 +639,9 @@ static long ipmi_unlocked_ioctl(struct file *file, { int ret; - lock_kernel(); + mutex_lock(&ipmi_mutex); ret = ipmi_ioctl(file, cmd, data); - unlock_kernel(); + mutex_unlock(&ipmi_mutex); return ret; } diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 654d566ca57c..ed10b741962d 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -35,7 +35,7 @@ #include <linux/moduleparam.h> #include <linux/ipmi.h> #include <linux/ipmi_smi.h> -#include <linux/smp_lock.h> +#include <linux/mutex.h> #include <linux/watchdog.h> #include <linux/miscdevice.h> #include <linux/init.h> @@ -149,6 +149,7 @@ #define WDIOC_GET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 22, int) #endif +static DEFINE_MUTEX(ipmi_watchdog_mutex); static int nowayout = WATCHDOG_NOWAYOUT; static ipmi_user_t watchdog_user; @@ -748,9 +749,9 @@ static long ipmi_unlocked_ioctl(struct file *file, { int ret; - lock_kernel(); + mutex_lock(&ipmi_watchdog_mutex); ret = ipmi_ioctl(file, cmd, arg); - unlock_kernel(); + mutex_unlock(&ipmi_watchdog_mutex); return ret; } @@ -844,7 +845,6 @@ static int ipmi_open(struct inode *ino, struct file *filep) if (test_and_set_bit(0, &ipmi_wdog_open)) return -EBUSY; - cycle_kernel_lock(); /* * Don't start the timer now, let it start on the |