iommu: exynos: remove useless spinlock
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 23 Jan 2015 15:51:18 +0000 (16:51 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 13 Apr 2015 10:44:07 +0000 (12:44 +0200)
This patch removes useless spinlocks and other unused members from
struct exynos_iommu_owner. There is no point is protecting this
structure by spinlock because content of this structure doesn't change
and other structures have their own spinlocks.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/iommu/exynos-iommu.c

index 80e8259600a5e9573b98634084a6e4307212473f..863563e008621e98e011272c9df88413bc5363f2 100644 (file)
@@ -189,9 +189,6 @@ struct exynos_iommu_owner {
        struct list_head client; /* entry of exynos_iommu_domain.clients */
        struct device *dev;
        struct device *sysmmu;
-       struct iommu_domain *domain;
-       void *vmm_data;         /* IO virtual memory manager's data */
-       spinlock_t lock;        /* Lock to preserve consistency of System MMU */
 };
 
 struct exynos_iommu_domain {
@@ -477,16 +474,12 @@ static int __exynos_sysmmu_enable(struct device *dev, phys_addr_t pgtable,
 
        BUG_ON(!has_sysmmu(dev));
 
-       spin_lock_irqsave(&owner->lock, flags);
-
        data = dev_get_drvdata(owner->sysmmu);
 
        ret = __sysmmu_enable(data, pgtable, domain);
        if (ret >= 0)
                data->master = dev;
 
-       spin_unlock_irqrestore(&owner->lock, flags);
-
        return ret;
 }
 
@@ -499,16 +492,12 @@ static bool exynos_sysmmu_disable(struct device *dev)
 
        BUG_ON(!has_sysmmu(dev));
 
-       spin_lock_irqsave(&owner->lock, flags);
-
        data = dev_get_drvdata(owner->sysmmu);
 
        disabled = __sysmmu_disable(data);
        if (disabled)
                data->master = NULL;
 
-       spin_unlock_irqrestore(&owner->lock, flags);
-
        return disabled;
 }