diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-24 16:22:54 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-01-08 11:27:19 +0300 |
commit | e2fcd6e427c2fae92b366b24759f95d77b6f7bc7 (patch) | |
tree | 2009a7d65be1900de8124ddc0749688ce68718f2 /drivers/dma/idxd | |
parent | 33cb6d1ed311af2c1dfd107fa334cfb51113ef35 (diff) | |
download | linux-e2fcd6e427c2fae92b366b24759f95d77b6f7bc7.tar.xz |
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>
Diffstat (limited to 'drivers/dma/idxd')
-rw-r--r-- | drivers/dma/idxd/init.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index 2c051e07c34c..25cc947c6179 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -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]); |