Skip to contentSkip to conversation

iommu/omap: using pm_runtime_resume_and_get to simplify the code

PATCH New [email protected] 1 participant 1 message Apr 20, 2022 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/omap: using pm_runtime_resume_and_get to simplify the code

From: Minghao Chi <[email protected]>

Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. This change is just to simplify the code, no actual functional changes.

---
 drivers/iommu/omap-iommu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iommu/omap-iommu.c +1 -3
index 4aab631ef517..7cfa80ccd9a8 100644
@@ -193,9 +193,7 @@ static int iommu_enable(struct omap_iommu *obj)
 {
 	int ret;
 
-	ret = pm_runtime_get_sync(obj->dev);
-	if (ret < 0)
-		pm_runtime_put_noidle(obj->dev);
+	ret = pm_runtime_resume_and_get(obj->dev);
 
 	return ret < 0 ? ret : 0;
 }
Signature · 7 lines
2.25.1


_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu