[PATCH 3/8] watchdog: mtk_wdt: Remove #ifdef guards for PM related functions
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Wed Jun 29 01:25:20 PDT 2022
Il 28/06/22 21:34, Paul Cercueil ha scritto:
> Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to
> handle the .suspend/.resume callbacks.
>
> These macros allow the suspend and resume functions to be automatically
> dropped by the compiler when CONFIG_SUSPEND is disabled, without having
> to use #ifdef guards. Not using #ifdef guards means that the code is
> always compiled independently of any Kconfig option, and thanks to that
> bugs and regressions are easier to catch.
>
> Signed-off-by: Paul Cercueil <paul at crapouillou.net>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Reviewed-by: Guenter Roeck <linux at roeck-us.net>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
More information about the Linux-mediatek
mailing list