diff options
author | Paul Cercueil <paul@crapouillou.net> | 2022-11-29 22:17:17 +0300 |
---|---|---|
committer | Paul Cercueil <paul@crapouillou.net> | 2022-12-12 16:07:01 +0300 |
commit | 10709aa89005fe428764d2e4334d578f502be345 (patch) | |
tree | 0b851baacc3b9e04c4bdd5e123e2fd15ec12eb48 /drivers/gpu/drm/imx/dcss/dcss-drv.c | |
parent | 68c8704de0527020094698f384ae8c5f749bba2f (diff) | |
download | linux-10709aa89005fe428764d2e4334d578f502be345.tar.xz |
drm: imx/dcss: Remove #ifdef guards for PM related functions
Use the EXPORT_GPL_DEV_PM_OPS() and pm_ptr() macros to handle the PM
callbacks.
These macros allow the PM functions to be automatically dropped by the
compiler when CONFIG_PM is disabled, without having to use #ifdef
guards.
This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Tested-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221129191733.137897-11-paul@crapouillou.net
Diffstat (limited to 'drivers/gpu/drm/imx/dcss/dcss-drv.c')
-rw-r--r-- | drivers/gpu/drm/imx/dcss/dcss-drv.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/imx/dcss/dcss-drv.c b/drivers/gpu/drm/imx/dcss/dcss-drv.c index 1c70f70247f6..431510bd811b 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-drv.c +++ b/drivers/gpu/drm/imx/dcss/dcss-drv.c @@ -117,19 +117,13 @@ static const struct of_device_id dcss_of_match[] = { MODULE_DEVICE_TABLE(of, dcss_of_match); -static const struct dev_pm_ops dcss_dev_pm = { - SET_SYSTEM_SLEEP_PM_OPS(dcss_dev_suspend, dcss_dev_resume) - SET_RUNTIME_PM_OPS(dcss_dev_runtime_suspend, - dcss_dev_runtime_resume, NULL) -}; - static struct platform_driver dcss_platform_driver = { .probe = dcss_drv_platform_probe, .remove = dcss_drv_platform_remove, .driver = { .name = "imx-dcss", .of_match_table = dcss_of_match, - .pm = &dcss_dev_pm, + .pm = pm_ptr(&dcss_dev_pm_ops), }, }; |