mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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: Zheng Yongjun <zhengyongjun3@huawei.com> Acked-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20201224132254.30961-1-zhengyongjun3@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
33cb6d1ed3
commit
e2fcd6e427
1 changed files with 1 additions and 2 deletions
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue