iommu/omap: Reset the domain field upon detaching
authorSuman Anna <s-anna@ti.com>
Wed, 22 Oct 2014 22:22:33 +0000 (17:22 -0500)
committerJoerg Roedel <jroedel@suse.de>
Thu, 23 Oct 2014 12:33:48 +0000 (14:33 +0200)
The .domain field in omap_iommu struct is set properly when the
OMAP IOMMU device is attached to, but is never reset properly
on detach. Reset this properly so that the OMAP IOMMU debugfs
logic can depend on this field before allowing the debugfs
operations.

Signed-off-by: Suman Anna <s-anna@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/omap-iommu.c

index 3dcaef0683823380a4cab865e50462c5160a02f0..2ba321921f81a11212fde6fd4919728b0f91db8e 100644 (file)
@@ -1206,6 +1206,7 @@ static void _omap_iommu_detach_dev(struct omap_iommu_domain *omap_domain,
 
        omap_domain->iommu_dev = arch_data->iommu_dev = NULL;
        omap_domain->dev = NULL;
+       oiommu->domain = NULL;
 }
 
 static void omap_iommu_detach_dev(struct iommu_domain *domain,