aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-21 16:47:18 -0400
committerInki Dae <inki.dae@samsung.com>2017-07-26 20:24:03 -0400
commit7e1751001818209b214b8c3df0b3c91fae250ea2 (patch)
treedc37a014774c460d8304183845e44b1d30aa08ec
parent8f4e01f9f05e460eceed03df7f1b90095727e05a (diff)
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: 9be7e9898444 ("drm/exynos/hdmi: clock code re-factoring") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 9087c91347c8..d3b69d66736f 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1932,8 +1932,7 @@ static int hdmi_remove(struct platform_device *pdev)
1932 return 0; 1932 return 0;
1933} 1933}
1934 1934
1935#ifdef CONFIG_PM 1935static int __maybe_unused exynos_hdmi_suspend(struct device *dev)
1936static int exynos_hdmi_suspend(struct device *dev)
1937{ 1936{
1938 struct hdmi_context *hdata = dev_get_drvdata(dev); 1937 struct hdmi_context *hdata = dev_get_drvdata(dev);
1939 1938
@@ -1942,7 +1941,7 @@ static int exynos_hdmi_suspend(struct device *dev)
1942 return 0; 1941 return 0;
1943} 1942}
1944 1943
1945static int exynos_hdmi_resume(struct device *dev) 1944static int __maybe_unused exynos_hdmi_resume(struct device *dev)
1946{ 1945{
1947 struct hdmi_context *hdata = dev_get_drvdata(dev); 1946 struct hdmi_context *hdata = dev_get_drvdata(dev);
1948 int ret; 1947 int ret;
@@ -1953,7 +1952,6 @@ static int exynos_hdmi_resume(struct device *dev)
1953 1952
1954 return 0; 1953 return 0;
1955} 1954}
1956#endif
1957 1955
1958static const struct dev_pm_ops exynos_hdmi_pm_ops = { 1956static const struct dev_pm_ops exynos_hdmi_pm_ops = {
1959 SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL) 1957 SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL)