OSDN Git Service

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 10:00:12 +0000 (11:00 +0100)
commita3a9a972e230b6198aea87c66fec0104c2b55ad1
treeaa7d477b21d62bfe84224971e3ebb75192ba6f6c
parent994f316d50e2a3ee7ec83745824398a169a030e2
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