projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efcd94c
)
iommu: Simplify init function
author
Heiner Kallweit
<hkallweit1@gmail.com>
Tue, 28 Jun 2016 18:38:36 +0000
(20:38 +0200)
committer
Joerg Roedel
<jroedel@suse.de>
Wed, 13 Jul 2016 10:28:55 +0000
(12:28 +0200)
iommu_group_ida and iommu_group_mutex can be initialized statically.
There's no need to do this dynamically in the init function.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iommu/iommu.c
b/drivers/iommu/iommu.c
index 3000051f48b40c3e1b9e359e009023ce1e245c4c..debce45b5b8c676b036b4bdfea419210a8e0e536 100644
(file)
--- a/
drivers/iommu/iommu.c
+++ b/
drivers/iommu/iommu.c
@@
-34,8
+34,8
@@
#include <trace/events/iommu.h>
static struct kset *iommu_group_kset;
-static
struct ida iommu_group_ida
;
-static
struct mutex iommu_group_mutex
;
+static
DEFINE_IDA(iommu_group_ida)
;
+static
DEFINE_MUTEX(iommu_group_mutex)
;
struct iommu_callback_data {
const struct iommu_ops *ops;
@@
-1483,9
+1483,6
@@
static int __init iommu_init(void)
{
iommu_group_kset = kset_create_and_add("iommu_groups",
NULL, kernel_kobj);
- ida_init(&iommu_group_ida);
- mutex_init(&iommu_group_mutex);
-
BUG_ON(!iommu_group_kset);
return 0;
This page took
0.025036 seconds
and
5
git commands to generate.