iommu/omap: Register driver before setting IOMMU ops
authorSuman Anna <s-anna@ti.com>
Wed, 12 Apr 2017 05:21:26 +0000 (00:21 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 09:58:42 +0000 (10:58 +0100)
commit5fbe79a375faffd0bc93cf4c52aac8127f1047ed
tree72e2862a524fad5f6f17804ec46ceb732ac19d58
parent069f9177f12ed127007eb9451c51b3175cdd14fb
iommu/omap: Register driver before setting IOMMU ops

[ Upstream commit abaa7e5b054aae567861628b74dbc7fbf8ed79e8 ]

Move the registration of the OMAP IOMMU platform driver before
setting the IOMMU callbacks on the platform bus. This causes
the IOMMU devices to be probed first before the .add_device()
callback is invoked for all registered devices, and allows
the iommu_group support to be added to the OMAP IOMMU driver.

While at this, also check for the return status from bus_set_iommu.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/omap-iommu.c