Commit e2fcd6e4 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Vinod Koul

dma: idxd: use DEFINE_MUTEX() for mutex lock

mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Acked-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20201224132254.30961-1-zhengyongjun3@huawei.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 33cb6d1e
......@@ -31,7 +31,7 @@ MODULE_AUTHOR("Intel Corporation");
bool support_enqcmd;
static struct idr idxd_idrs[IDXD_TYPE_MAX];
static struct mutex idxd_idr_lock;
static DEFINE_MUTEX(idxd_idr_lock);
static struct pci_device_id idxd_pci_tbl[] = {
/* DSA ver 1.0 platforms */
......@@ -544,7 +544,6 @@ static int __init idxd_init_module(void)
else
support_enqcmd = true;
mutex_init(&idxd_idr_lock);
for (i = 0; i < IDXD_TYPE_MAX; i++)
idr_init(&idxd_idrs[i]);
......
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