Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20210828090219.1177-1-caihuoqing@baidu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Cai Huoqing and committed by
Greg Kroah-Hartman
86854b43 8988bacd

+1 -2
+1 -2
drivers/base/platform.c
··· 1466 1466 } 1467 1467 1468 1468 static const struct dev_pm_ops platform_dev_pm_ops = { 1469 - .runtime_suspend = pm_generic_runtime_suspend, 1470 - .runtime_resume = pm_generic_runtime_resume, 1469 + SET_RUNTIME_PM_OPS(pm_generic_runtime_suspend, pm_generic_runtime_resume, NULL) 1471 1470 USE_PLATFORM_PM_SLEEP_OPS 1472 1471 }; 1473 1472