Commit e5a69e27 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by James Bottomley

[SCSI] megaraid_sas: Convert aen_mutex to the mutex API

Signed-off-by: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: default avatarBo Yang <Bo.Yang@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 3ce7c658
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/uio.h> #include <linux/uio.h>
...@@ -2358,7 +2359,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2358,7 +2359,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
spin_lock_init(&instance->cmd_pool_lock); spin_lock_init(&instance->cmd_pool_lock);
sema_init(&instance->aen_mutex, 1); mutex_init(&instance->aen_mutex);
sema_init(&instance->ioctl_sem, MEGASAS_INT_CMDS); sema_init(&instance->ioctl_sem, MEGASAS_INT_CMDS);
/* /*
...@@ -2874,10 +2875,10 @@ static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg) ...@@ -2874,10 +2875,10 @@ static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg)
if (!instance) if (!instance)
return -ENODEV; return -ENODEV;
down(&instance->aen_mutex); mutex_lock(&instance->aen_mutex);
error = megasas_register_aen(instance, aen.seq_num, error = megasas_register_aen(instance, aen.seq_num,
aen.class_locale_word); aen.class_locale_word);
up(&instance->aen_mutex); mutex_unlock(&instance->aen_mutex);
return error; return error;
} }
......
...@@ -1089,7 +1089,7 @@ struct megasas_instance { ...@@ -1089,7 +1089,7 @@ struct megasas_instance {
struct megasas_evt_detail *evt_detail; struct megasas_evt_detail *evt_detail;
dma_addr_t evt_detail_h; dma_addr_t evt_detail_h;
struct megasas_cmd *aen_cmd; struct megasas_cmd *aen_cmd;
struct semaphore aen_mutex; struct mutex aen_mutex;
struct semaphore ioctl_sem; struct semaphore ioctl_sem;
struct Scsi_Host *host; struct Scsi_Host *host;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment