iommu/of: Refactor of_iommu_configure() for error handling
authorRobin Murphy <robin.murphy@arm.com>
Mon, 10 Apr 2017 11:20:56 +0000 (16:50 +0530)
committerJoerg Roedel <jroedel@suse.de>
Thu, 20 Apr 2017 14:31:05 +0000 (16:31 +0200)
commit2a0c57545a291f257cd231b1c4b18285b84608d8
tree2417db9a9b8d8f16cc20586d8113a5aeca656939
parent5016bdb796b3726eec043ca0ce3be981f712c756
iommu/of: Refactor of_iommu_configure() for error handling

In preparation for some upcoming cleverness, rework the control flow in
of_iommu_configure() to minimise duplication and improve the propogation
of errors. It's also as good a time as any to switch over from the
now-just-a-compatibility-wrapper of_iommu_get_ops() to using the generic
IOMMU instance interface directly.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/of_iommu.c