diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-02 09:58:49 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-02 09:58:49 -0400 |
| commit | 9e3be1edbe5ca57df51140b523168237b3a01f4d (patch) | |
| tree | a72c0ec1ce0fbcdcd12ecb6aad9bedcc94b94f9d /drivers/scsi/mpt2sas/mpt2sas_ctl.c | |
| parent | 473f89fff76568a9f30c53b458e6323d48b0ab95 (diff) | |
| parent | 29c798fecb9b846b363b0a02fa662ff42fc19426 (diff) | |
Merge branch 'for-2.6.37' into HEAD
WARN() fix from Joe moved.
Conflicts:
sound/soc/codecs/wm_hubs.c
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_ctl.c')
| -rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_ctl.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c index b774973f076..40cb8aeb21b 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c +++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c @@ -51,7 +51,7 @@ #include <linux/types.h> #include <linux/pci.h> #include <linux/delay.h> -#include <linux/smp_lock.h> +#include <linux/mutex.h> #include <linux/compat.h> #include <linux/poll.h> @@ -61,6 +61,7 @@ #include "mpt2sas_base.h" #include "mpt2sas_ctl.h" +static DEFINE_MUTEX(_ctl_mutex); static struct fasync_struct *async_queue; static DECLARE_WAIT_QUEUE_HEAD(ctl_poll_wait); @@ -2238,9 +2239,9 @@ _ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { long ret; - lock_kernel(); + mutex_lock(&_ctl_mutex); ret = _ctl_ioctl_main(file, cmd, (void __user *)arg); - unlock_kernel(); + mutex_unlock(&_ctl_mutex); return ret; } @@ -2309,12 +2310,12 @@ _ctl_ioctl_compat(struct file *file, unsigned cmd, unsigned long arg) { long ret; - lock_kernel(); + mutex_lock(&_ctl_mutex); if (cmd == MPT2COMMAND32) ret = _ctl_compat_mpt_command(file, cmd, arg); else ret = _ctl_ioctl_main(file, cmd, (void __user *)arg); - unlock_kernel(); + mutex_unlock(&_ctl_mutex); return ret; } #endif @@ -2952,6 +2953,7 @@ static const struct file_operations ctl_fops = { #ifdef CONFIG_COMPAT .compat_ioctl = _ctl_ioctl_compat, #endif + .llseek = noop_llseek, }; static struct miscdevice ctl_dev = { |
