projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33cb6d1
)
dma: idxd: use DEFINE_MUTEX() for mutex lock
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Thu, 24 Dec 2020 13:22:54 +0000
(21:22 +0800)
committer
Vinod Koul
<vkoul@kernel.org>
Fri, 8 Jan 2021 08:27:19 +0000
(13:57 +0530)
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>
drivers/dma/idxd/init.c
patch
|
blob
|
history
diff --git
a/drivers/dma/idxd/init.c
b/drivers/dma/idxd/init.c
index 2c051e07c34c2410458e2590ead84dbdc9f72201..25cc947c61796483d9b45590256bd09a039ed114 100644
(file)
--- 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]);