diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 7 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index e3c5c5282203..3ad379fcd18f 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/mutex.h> | ||
34 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
35 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
36 | #include <linux/uio.h> | 37 | #include <linux/uio.h> |
@@ -2358,7 +2359,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2358 | 2359 | ||
2359 | spin_lock_init(&instance->cmd_pool_lock); | 2360 | spin_lock_init(&instance->cmd_pool_lock); |
2360 | 2361 | ||
2361 | sema_init(&instance->aen_mutex, 1); | 2362 | mutex_init(&instance->aen_mutex); |
2362 | sema_init(&instance->ioctl_sem, MEGASAS_INT_CMDS); | 2363 | sema_init(&instance->ioctl_sem, MEGASAS_INT_CMDS); |
2363 | 2364 | ||
2364 | /* | 2365 | /* |
@@ -2874,10 +2875,10 @@ static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg) | |||
2874 | if (!instance) | 2875 | if (!instance) |
2875 | return -ENODEV; | 2876 | return -ENODEV; |
2876 | 2877 | ||
2877 | down(&instance->aen_mutex); | 2878 | mutex_lock(&instance->aen_mutex); |
2878 | error = megasas_register_aen(instance, aen.seq_num, | 2879 | error = megasas_register_aen(instance, aen.seq_num, |
2879 | aen.class_locale_word); | 2880 | aen.class_locale_word); |
2880 | up(&instance->aen_mutex); | 2881 | mutex_unlock(&instance->aen_mutex); |
2881 | return error; | 2882 | return error; |
2882 | } | 2883 | } |
2883 | 2884 | ||
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 4dffc918a414..08c74c991781 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
@@ -1089,7 +1089,7 @@ struct megasas_instance { | |||
1089 | struct megasas_evt_detail *evt_detail; | 1089 | struct megasas_evt_detail *evt_detail; |
1090 | dma_addr_t evt_detail_h; | 1090 | dma_addr_t evt_detail_h; |
1091 | struct megasas_cmd *aen_cmd; | 1091 | struct megasas_cmd *aen_cmd; |
1092 | struct semaphore aen_mutex; | 1092 | struct mutex aen_mutex; |
1093 | struct semaphore ioctl_sem; | 1093 | struct semaphore ioctl_sem; |
1094 | 1094 | ||
1095 | struct Scsi_Host *host; | 1095 | struct Scsi_Host *host; |