From: Janghyuck Kim Date: Thu, 19 May 2016 11:22:08 +0000 (+0900) Subject: [COMMON] iommu/exynos: remove rpm-enabled check in suspend/resume X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9969150eed156b529498255931d1137d8fbe03ad;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] iommu/exynos: remove rpm-enabled check in suspend/resume 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 --- diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 580196df0e84..13109cea161b 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -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);