Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1318672

[RFC PATCH 3/6] of: iommu: Increment DT node refcount in of_iommu_set_ops()

From Anup Patel <anup.patel@broadcom.com>
Newsgroups linux.kernel
Subject [RFC PATCH 3/6] of: iommu: Increment DT node refcount in of_iommu_set_ops()
Date 2016-01-27 06:30 +0100
Message-ID <qVqQ2-76w-25@gated-at.bofh.it> (permalink)
References <qVqQ1-76w-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


We are saving pointer to iommu DT node in of_iommu_set_ops()
hence we should increment DT node ref count.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
---
 drivers/iommu/of_iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index 60ba238..5fea665 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -110,6 +110,7 @@ void of_iommu_set_ops(struct device_node *np, struct iommu_ops *ops)
 	if (WARN_ON(!iommu))
 		return;
 
+	of_node_get(np);
 	INIT_LIST_HEAD(&iommu->list);
 	iommu->np = np;
 	iommu->ops = ops;
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/6] iommu/arm-smmu: Add support for DMA domains and instruction fetch Anup Patel <anup.patel@broadcom.com> - 2016-01-27 06:30 +0100
  [RFC PATCH 3/6] of: iommu: Increment DT node refcount in of_iommu_set_ops() Anup Patel <anup.patel@broadcom.com> - 2016-01-27 06:30 +0100

csiph-web