]> git.baikalelectronics.ru Git - kernel.git/commit
drm: exynos: mark pm functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Fri, 21 Jul 2017 20:47:18 +0000 (22:47 +0200)
committerInki Dae <inki.dae@samsung.com>
Thu, 27 Jul 2017 00:24:03 +0000 (09:24 +0900)
commit602f09819b27a51504e00bde66d39303d25564e6
treedc37a014774c460d8304183845e44b1d30aa08ec
parentb9c48afde310304e944f3b4931a17bd1ceb1fb42
drm: exynos: mark pm functions as __maybe_unused

The rework of the exynos DRM clock handling introduced
warnings for configurations that have CONFIG_PM disabled:

drivers/gpu/drm/exynos/exynos_hdmi.c:736:13: error: 'hdmi_clk_disable_gates' defined but not used [-Werror=unused-function]
 static void hdmi_clk_disable_gates(struct hdmi_context *hdata)
             ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/exynos/exynos_hdmi.c:717:12: error: 'hdmi_clk_enable_gates' defined but not used [-Werror=unused-function]
 static int hdmi_clk_enable_gates(struct hdmi_context *hdata)

The problem is that the PM functions themselves are inside of
an #ifdef, but some functions they call are not.

This patch removes the #ifdef and instead marks the PM functions
as __maybe_unused, which is a more reliable way to get it right.

Link: https://patchwork.kernel.org/patch/8436281/
Fixes: 7ee6c97e28ce ("drm/exynos/hdmi: clock code re-factoring")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_hdmi.c