aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 3c32e69afcd..c0bb8061401 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -35,6 +35,7 @@
35#include <asm/uaccess.h> 35#include <asm/uaccess.h>
36#include <linux/fs.h> 36#include <linux/fs.h>
37#include <linux/compat.h> 37#include <linux/compat.h>
38#include <linux/mutex.h>
38 39
39#include <scsi/scsi.h> 40#include <scsi/scsi.h>
40#include <scsi/scsi_cmnd.h> 41#include <scsi/scsi_cmnd.h>
@@ -72,7 +73,7 @@ MODULE_DEVICE_TABLE(pci, megasas_pci_table);
72static int megasas_mgmt_majorno; 73static int megasas_mgmt_majorno;
73static struct megasas_mgmt_info megasas_mgmt_info; 74static struct megasas_mgmt_info megasas_mgmt_info;
74static struct fasync_struct *megasas_async_queue; 75static struct fasync_struct *megasas_async_queue;
75static DECLARE_MUTEX(megasas_async_queue_mutex); 76static DEFINE_MUTEX(megasas_async_queue_mutex);
76 77
77/** 78/**
78 * megasas_get_cmd - Get a command from the free pool 79 * megasas_get_cmd - Get a command from the free pool
@@ -2362,11 +2363,11 @@ static int megasas_mgmt_fasync(int fd, struct file *filep, int mode)
2362{ 2363{
2363 int rc; 2364 int rc;
2364 2365
2365 down(&megasas_async_queue_mutex); 2366 mutex_lock(&megasas_async_queue_mutex);
2366 2367
2367 rc = fasync_helper(fd, filep, mode, &megasas_async_queue); 2368 rc = fasync_helper(fd, filep, mode, &megasas_async_queue);
2368 2369
2369 up(&megasas_async_queue_mutex); 2370 mutex_unlock(&megasas_async_queue_mutex);
2370 2371
2371 if (rc >= 0) { 2372 if (rc >= 0) {
2372 /* For sanity check when we get ioctl */ 2373 /* For sanity check when we get ioctl */