scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock

spinlock can be initialized automatically with DEFINE_SPINLOCK() rather
than explicitly calling spin_lock_init().

Link: https://lore.kernel.org/r/20210329094532.4165147-1-liushixin2@huawei.com
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Shixin Liu <liushixin2@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Shixin Liu 2021-03-29 17:45:32 +08:00 committed by Martin K. Petersen
parent 807b31d8e0
commit 311e87b709

View File

@ -213,7 +213,7 @@ static bool support_nvme_encapsulation;
static bool support_pci_lane_margining;
/* define lock for aen poll */
static spinlock_t poll_aen_lock;
static DEFINE_SPINLOCK(poll_aen_lock);
extern struct dentry *megasas_debugfs_root;
extern int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num);
@ -8934,8 +8934,6 @@ static int __init megasas_init(void)
*/
pr_info("megasas: %s\n", MEGASAS_VERSION);
spin_lock_init(&poll_aen_lock);
support_poll_for_event = 2;
support_device_change = 1;
support_nvme_encapsulation = true;