From patchwork Tue Nov 17 15:08:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7637921 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A22419F392 for ; Tue, 17 Nov 2015 15:08:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C929220173 for ; Tue, 17 Nov 2015 15:08:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CF50F2015A for ; Tue, 17 Nov 2015 15:08:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA45F6E3EA; Tue, 17 Nov 2015 07:08:48 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 372B66E3EA for ; Tue, 17 Nov 2015 07:08:46 -0800 (PST) Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0M0Qv7-1aF0ps3zGH-00uZQT; Tue, 17 Nov 2015 16:08:38 +0100 From: Arnd Bergmann To: Inki Dae 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 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 Cc: linux-samsung-soc@vger.kernel.org, Seung-Woo Kim , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Kyungmin Park , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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") Reviewed-by: Krzysztof Kozlowski 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)