[COMMON] iommu/exynos: remove rpm-enabled check in suspend/resume
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Thu, 19 May 2016 11:22:08 +0000 (20:22 +0900)
committerSangwook Ju <sw.ju@samsung.com>
Mon, 14 May 2018 10:45:19 +0000 (19:45 +0900)
After removing CONFIG_PM_RUNTIME, pm_runtime_enabled() always returns
zero because sysmmu driver calls pm_runtime_enable() at probe time.
It results SFR access in suspend/resume callback even though power block
is off. To avoid SFR access, condition checking by pm_runtime_enabled()
is removed by this patch.

Change-Id: I2afea1ad4b3bdc57cb50d71423e44358b3023696
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
drivers/iommu/exynos-iommu.c

index 580196df0e84fba22e5e9d1759c0cbf023ee7f1e..13109cea161b5a56c3343412d453283ff59adf2e 100644 (file)
@@ -552,10 +552,8 @@ static int exynos_sysmmu_suspend(struct device *dev)
 
        spin_lock_irqsave(&drvdata->lock, flags);
        if (is_sysmmu_active(drvdata) &&
-                       (!pm_runtime_enabled(dev) ||
-                        is_sysmmu_runtime_active(drvdata))) {
+                       is_sysmmu_runtime_active(drvdata))
                __sysmmu_disable_nocount(drvdata);
-       }
        spin_unlock_irqrestore(&drvdata->lock, flags);
 
        return 0;
@@ -568,8 +566,7 @@ static int exynos_sysmmu_resume(struct device *dev)
 
        spin_lock_irqsave(&drvdata->lock, flags);
        if (is_sysmmu_active(drvdata) &&
-                       (!pm_runtime_enabled(dev) ||
-                        is_sysmmu_runtime_active(drvdata)))
+                        is_sysmmu_runtime_active(drvdata))
                __sysmmu_enable_nocount(drvdata);
        spin_unlock_irqrestore(&drvdata->lock, flags);