diff options
author | Shixin Liu <liushixin2@huawei.com> | 2021-03-29 17:45:32 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-05-10 13:24:07 -0400 |
commit | 311e87b70913e6ac6f3c6d5816efb8a3e81eb7e6 (patch) | |
tree | e0aa915b7201b29912d8a40a2bb8df99e55f9c0f /drivers/scsi/megaraid | |
parent | 807b31d8e0fce2160683746b54d7f3010a2d3cde (diff) | |
download | linux-311e87b70913e6ac6f3c6d5816efb8a3e81eb7e6.tar.bz2 |
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>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 4d4e9dbe5193..8ed347eebf07 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -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; |