Commit 106650f1 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Joerg Roedel

iommu/amd: Use DEFINE_SPINLOCK() for spinlock

Spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201228135112.28621-1-zhengyongjun3@huawei.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent f8993dc6
......@@ -77,7 +77,7 @@ struct fault {
};
static LIST_HEAD(state_list);
static spinlock_t state_lock;
static DEFINE_SPINLOCK(state_lock);
static struct workqueue_struct *iommu_wq;
......@@ -938,8 +938,6 @@ static int __init amd_iommu_v2_init(void)
return 0;
}
spin_lock_init(&state_lock);
ret = -ENOMEM;
iommu_wq = alloc_workqueue("amd_iommu_v2", WQ_MEM_RECLAIM, 0);
if (iommu_wq == NULL)
......
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