All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: fix building without CONFIG_PM_SLEEP
@ 2015-11-17 15:08 ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2015-11-17 15:08 UTC (permalink / raw)
  To: Inki Dae
  Cc: linux-samsung-soc, Seung-Woo Kim, linux-kernel, dri-devel,
	Kyungmin Park, linux-arm-kernel

The runtime PM operations use the suspend/resume functions
even when CONFIG_PM_SLEEP is not set, but this now fails
for the exynos DRM driver:

exynos_mixer.c:1289:61: error: 'exynos_mixer_resume' undeclared here (not in a function)
  SET_RUNTIME_PM_OPS(exynos_mixer_suspend, exynos_mixer_resume, NULL)

This removes the #ifdef and instead marks the functions as
__maybe_unused, which does the right thing in all cases and
also looks nicer.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 	 ("drm/exynos: add pm_runtime to Mixer")

diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 7498c6e76a53..fcaf71df77c1 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -1230,8 +1230,7 @@ static int mixer_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int exynos_mixer_suspend(struct device *dev)
+static int __maybe_unused exynos_mixer_suspend(struct device *dev)
 {
 	struct mixer_context *ctx = dev_get_drvdata(dev);
 	struct mixer_resources *res = &ctx->mixer_res;
@@ -1247,7 +1246,7 @@ static int exynos_mixer_suspend(struct device *dev)
 	return 0;
 }
 
-static int exynos_mixer_resume(struct device *dev)
+static int __maybe_unused exynos_mixer_resume(struct device *dev)
 {
 	struct mixer_context *ctx = dev_get_drvdata(dev);
 	struct mixer_resources *res = &ctx->mixer_res;
@@ -1283,7 +1282,6 @@ static int exynos_mixer_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops exynos_mixer_pm_ops = {
 	SET_RUNTIME_PM_OPS(exynos_mixer_suspend, exynos_mixer_resume, NULL)

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-01-26 12:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 15:08 [PATCH] drm/exynos: fix building without CONFIG_PM_SLEEP Arnd Bergmann
2015-11-17 15:08 ` Arnd Bergmann
2015-11-17 15:08 ` Arnd Bergmann
2015-11-17 15:45 ` [PATCH] drm/exynos: remove unused variables Arnd Bergmann
2015-11-17 15:45   ` Arnd Bergmann
2016-01-25 23:40 ` [PATCH] drm/exynos: fix building without CONFIG_PM_SLEEP Krzysztof Kozlowski
2016-01-25 23:40   ` Krzysztof Kozlowski
2016-01-26  4:55   ` Inki Dae
2016-01-26  4:55     ` Inki Dae
2016-01-26  4:55     ` Inki Dae
2016-01-26  6:21 ` Inki Dae
2016-01-26  6:21   ` Inki Dae
2016-01-26 12:56   ` Arnd Bergmann
2016-01-26 12:56     ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.