drm: imx/dcss: Remove #ifdef guards for PM related functions
authorPaul Cercueil <paul@crapouillou.net>
Tue, 29 Nov 2022 19:17:17 +0000 (19:17 +0000)
committerPaul Cercueil <paul@crapouillou.net>
Mon, 12 Dec 2022 13:07:01 +0000 (13:07 +0000)
commit10709aa89005fe428764d2e4334d578f502be345
tree0b851baacc3b9e04c4bdd5e123e2fd15ec12eb48
parent68c8704de0527020094698f384ae8c5f749bba2f
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
drivers/gpu/drm/imx/dcss/dcss-dev.c
drivers/gpu/drm/imx/dcss/dcss-dev.h
drivers/gpu/drm/imx/dcss/dcss-drv.c