diff options
| author | Cai Huoqing <[email protected]> | 2021-08-28 09:02:19 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-09-14 14:52:41 +0000 |
| commit | 86854b4379d43aaffdbe1fac0879cce543247e9b (patch) | |
| tree | 4bea51b233ee49a2bb9636185cae3ecef17f340c /drivers/base/platform.c | |
| parent | kobject: unexport kobject_create() in kobject.h (diff) | |
| download | kernel-86854b4379d43aaffdbe1fac0879cce543247e9b.tar.gz kernel-86854b4379d43aaffdbe1fac0879cce543247e9b.zip | |
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.
Signed-off-by: Cai Huoqing <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/base/platform.c')
| -rw-r--r-- | drivers/base/platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 652531f67135..598acf93a360 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -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 }; |
