aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2016-06-28 14:38:36 -0400
committerJoerg Roedel <jroedel@suse.de>2016-07-13 06:28:55 -0400
commite38d1f1312e4e88d1dab1fdf591824e1f3b105a9 (patch)
treeea0e254cdf980dc211cedff8e5d2ee02b12b4c03
parentefcd94c07665a074fb5e25dfaaba0a9f606248b5 (diff)
iommu: Simplify init function
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>
-rw-r--r--drivers/iommu/iommu.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 3000051f48b4..debce45b5b8c 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -34,8 +34,8 @@
34#include <trace/events/iommu.h> 34#include <trace/events/iommu.h>
35 35
36static struct kset *iommu_group_kset; 36static struct kset *iommu_group_kset;
37static struct ida iommu_group_ida; 37static DEFINE_IDA(iommu_group_ida);
38static struct mutex iommu_group_mutex; 38static DEFINE_MUTEX(iommu_group_mutex);
39 39
40struct iommu_callback_data { 40struct iommu_callback_data {
41 const struct iommu_ops *ops; 41 const struct iommu_ops *ops;
@@ -1483,9 +1483,6 @@ static int __init iommu_init(void)
1483{ 1483{
1484 iommu_group_kset = kset_create_and_add("iommu_groups", 1484 iommu_group_kset = kset_create_and_add("iommu_groups",
1485 NULL, kernel_kobj); 1485 NULL, kernel_kobj);
1486 ida_init(&iommu_group_ida);
1487 mutex_init(&iommu_group_mutex);
1488
1489 BUG_ON(!iommu_group_kset); 1486 BUG_ON(!iommu_group_kset);
1490 1487
1491 return 0; 1488 return 0;