aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-09-18 09:51:38 -0400
committerInki Dae <inki.dae@samsung.com>2016-09-18 21:07:26 -0400
commit4158dbe1be9b420e1fdd9ec5c033647a605ca485 (patch)
tree202dd3df10dd8d66ef128b2eb0dcf12591709fa7
parentb05984e21a7e000bf5074ace00d7a574944b2c16 (diff)
Subject: [PATCH, RESEND] drm: exynos: avoid unused function warning
When CONFIG_PM is not set, we get a warning about an unused function: drivers/gpu/drm/exynos/exynos_drm_gsc.c:1219:12: error: 'gsc_clk_ctrl' defined but not used [-Werror=unused-function] static int gsc_clk_ctrl(struct gsc_context *ctx, bool enable) ^~~~~~~~~~~~ This removes the two #ifdef checks in this file and instead marks the functions as __maybe_unused, which is a more reliable way of doing the same, allowing better build coverage and avoiding the warning above. 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_drm_gsc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index b1894aa9286e..52a9d269484e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1760,8 +1760,7 @@ static int gsc_remove(struct platform_device *pdev)
1760 return 0; 1760 return 0;
1761} 1761}
1762 1762
1763#ifdef CONFIG_PM 1763static int __maybe_unused gsc_runtime_suspend(struct device *dev)
1764static int gsc_runtime_suspend(struct device *dev)
1765{ 1764{
1766 struct gsc_context *ctx = get_gsc_context(dev); 1765 struct gsc_context *ctx = get_gsc_context(dev);
1767 1766
@@ -1770,7 +1769,7 @@ static int gsc_runtime_suspend(struct device *dev)
1770 return gsc_clk_ctrl(ctx, false); 1769 return gsc_clk_ctrl(ctx, false);
1771} 1770}
1772 1771
1773static int gsc_runtime_resume(struct device *dev) 1772static int __maybe_unused gsc_runtime_resume(struct device *dev)
1774{ 1773{
1775 struct gsc_context *ctx = get_gsc_context(dev); 1774 struct gsc_context *ctx = get_gsc_context(dev);
1776 1775
@@ -1778,7 +1777,6 @@ static int gsc_runtime_resume(struct device *dev)
1778 1777
1779 return gsc_clk_ctrl(ctx, true); 1778 return gsc_clk_ctrl(ctx, true);
1780} 1779}
1781#endif
1782 1780
1783static const struct dev_pm_ops gsc_pm_ops = { 1781static const struct dev_pm_ops gsc_pm_ops = {
1784 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1782 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,