Skip to contentSkip to conversation

driver core: platform: Make use of the helper macro SET_RUNTIME_PM_OPS()

PATCH New Cai Huoqing 1 participant 1 message Aug 28, 2021 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver core: platform: Make use of the helper macro SET_RUNTIME_PM_OPS()

Use the helper macro SET_RUNTIME_PM_OPS() instead of the verbose operators ".runtime_suspend/.runtime_resume", because the SET_RUNTIME_PM_OPS() is a nice helper macro that could be brought in to make code a little clearer, a little more concise.

---
 drivers/base/platform.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/base/platform.c +1 -2
index 652531f67135..598acf93a360 100644
@@ -1466,8 +1466,7 @@ int platform_dma_configure(struct device *dev)
 }
 
 static const struct dev_pm_ops platform_dev_pm_ops = {
-	.runtime_suspend = pm_generic_runtime_suspend,
-	.runtime_resume = pm_generic_runtime_resume,
+	SET_RUNTIME_PM_OPS(pm_generic_runtime_suspend, pm_generic_runtime_resume, NULL)
 	USE_PLATFORM_PM_SLEEP_OPS
 };
 
Signature · 1 line
2.25.1