summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/arm-smmu.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-08-15 11:54:13 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-08-15 11:54:13 -0400
commit55cfcd12115419810972f62741df19ca98c575a3 (patch)
treeeb9b6e6666c2791e7af030f3f4bf47fcce615454 /drivers/iommu/arm-smmu.c
parent35bdb0979555e2fca39a5b0302d1b0c4b17d81e6 (diff)
parent75e8c48b9ef30bfda38e7f6e5d807352fbf0b090 (diff)
downloadop-kernel-dev-55cfcd12115419810972f62741df19ca98c575a3.zip
op-kernel-dev-55cfcd12115419810972f62741df19ca98c575a3.tar.gz
Merge branch 'open_state'
Diffstat (limited to 'drivers/iommu/arm-smmu.c')
-rw-r--r--drivers/iommu/arm-smmu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index b97188a..2d80fa8 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1519,6 +1519,13 @@ static int arm_smmu_add_device(struct device *dev)
if (using_legacy_binding) {
ret = arm_smmu_register_legacy_master(dev, &smmu);
+
+ /*
+ * If dev->iommu_fwspec is initally NULL, arm_smmu_register_legacy_master()
+ * will allocate/initialise a new one. Thus we need to update fwspec for
+ * later use.
+ */
+ fwspec = dev->iommu_fwspec;
if (ret)
goto out_free;
} else if (fwspec && fwspec->ops == &arm_smmu_ops) {
OpenPOWER on IntegriCloud