OSDN Git Service

fbdev: s6e8ax0: avoid unused function warnings
authorArnd Bergmann <arnd@arndb.de>
Mon, 25 Jan 2016 15:04:03 +0000 (16:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:03:46 +0000 (11:03 +0100)
commit12ec0529dbcc9871f68ced823572169ddc9048f2
treecae8aa33ae2928af868c136248922a73421c7139
parent25bce31b08d1fe7332f2e814472c5eacc5d84d65
fbdev: s6e8ax0: avoid unused function warnings

commit b54729b6cea7d1f46b1ed70cb7065c6bdefaa780 upstream.

The s6e8ax0 suspend/resume functions are hidden inside of an #ifdef
when CONFIG_PM is set to avoid unused function warnings, but they
call some other functions that nothing else calls, and we get warnings
about those:

drivers/video/fbdev/exynos/s6e8ax0.c:449:13: error: 's6e8ax0_sleep_in' defined but not used [-Werror=unused-function]
drivers/video/fbdev/exynos/s6e8ax0.c:485:13: error: 's6e8ax0_display_off' defined but not used [-Werror=unused-function]

This marks the PM functions as __maybe_unused so the compiler can
silently drop them when they are not referenced.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/exynos/s6e8ax0.c