From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753508AbbKQPJP (ORCPT ); Tue, 17 Nov 2015 10:09:15 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:61898 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbbKQPJN (ORCPT ); Tue, 17 Nov 2015 10:09:13 -0500 From: Arnd Bergmann To: Inki Dae Cc: Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] drm/exynos: fix building without CONFIG_PM_SLEEP Date: Tue, 17 Nov 2015 16:08:36 +0100 Message-ID: <9569056.LBRz4v8fSj@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:7PlF9bNo17f0GdXO0rszVZCJ1vqza5Mi6lGDrjkyotlx2FMaA+S llpbcdskWYcAkS85QFk3gSOG9zndtIQLefSdn+x89cwuxaRjBXeXoU4Ug4ZXTq4bAiRfqkm jLs+qu8YJGRKpTS29/bAg75sjxe96gHn0SrsUJIKTBZJ7sIalYSZYbdlfZrHsndLJD+UNX0 SpEL9iShxc0TgxdGjTuQQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:HFAiNZ1CtSE=:/IKRSn6XTi4DAksaKsUALC q+n1q/grw0ps8B/42A8nJPEh9mUO0ALb0V0VqL7mQKwrEyO3m5uEfYRJ4hKuE3SJ3gjANn0Cq 56BzRjS8gTpyVw+SnahoZJxvycfF/B8NtdIWp5PMfyPWEIbNiV5DFIWcZhmS4GGn3a+qku6vE ENeG0xaLWeWaZg1+hNGfhdTdr77CtG1L1JBQO8RlhgHFGtU1TiB2q4ZF4w+DJKXuCs6AfbyMD u7oZu/fempjpODwtXMovkkThyEpGMFayv3sMaG3yPh8yaJGSsR17t2sp87YngQVBs9Ey/MYbY HhqCjeeKeELv9JtMCGsfSW6kRwlghRPOSwl7iYgd/y+uiUYiN5Dto0gWqzEYOswUXFh0fLybc J3J9IJNknkIhKcEacgfCAX9Hy8p1LZsFC5dLIxFQ5Yqw/3fTglRNruQ8mfYdw9iBx35DqmGl4 ZE0Qzk6Kmw0LWgjrwniOxJlcCfJyV60EDWOuTk5RB+2oXS8uMzImYK4uDE+CWLo+Cy9kLlk6x nANiQIKeKcAL9VUTOgF2mJTOUOY/6rBpKZs55MiouwxdRKWCrmDAjmUdOYXyHW9H0DTznNumv BQByubCbMrhk8Cqw9kYgGJJtXBoTUoEwnjL0S5Yf2Q7/3BnFtfJuzRNaZNG62BJN5q+8zRi0e EzzdLMp9TYqGLQ1EFwPM7h7Fk0u2QySuw5LLHCLwe9G7HZcGZK8KJN+XAvRCqP+cAecraR7pi LGsaPVgornb7TWzq Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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)