From patchwork Thu Jun 30 12:23:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9207381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A8BA760752 for ; Thu, 30 Jun 2016 12:21:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99777284AC for ; Thu, 30 Jun 2016 12:21:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DD972867D; Thu, 30 Jun 2016 12:21:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DED5284AC for ; Thu, 30 Jun 2016 12:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932133AbcF3MVD (ORCPT ); Thu, 30 Jun 2016 08:21:03 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:52916 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932106AbcF3MVB (ORCPT ); Thu, 30 Jun 2016 08:21:01 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0M3JRY-1baOrV10eO-00r2uG; Thu, 30 Jun 2016 14:20:53 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Laurent Pinchart , Arnd Bergmann , Laurent Pinchart , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] [media] vsp1: use __maybe_unused for PM handlers Date: Thu, 30 Jun 2016 14:23:02 +0200 Message-Id: <20160630122325.4002029-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:GVX3SXdx8SIFDTZFclKT7Eu/kNxb7sBX7cjNwfrsE6mnsfXsOwL paOH8UDlRrDylbXeoHxNtWOv8PNbvqHu3tk3/VFxEibk7LkPUUClnRHVQfUGX25rkRDMvdz 3PYHS1aDfgXXMskpkKGKl4gjQ8t9kmTPr+zCEjYeo6WHyYZGNAwn7TinsYI90fe9u5GujOY Xar+AmdsLnBeJSBYYNhtw== X-UI-Out-Filterresults: notjunk:1; V01:K0:9BkPEbTgOMw=:vk5/65CL5k1jt+XoiI4E/F k9UWhBsL68U10jEEip1X3Uerq1/ft5CZadhgCpy0PlMT1uQQzet7GupQQKmUeixq9db/7jEMn f4m2OAJ1vCevH+lBCeJGMaglP1NqQfKPxt4NmpEN2N2vE1HB2oH4DBtQwlN1B5l4ja5jjaeJF ecN8E0AEuqAJB4gi7ygXUt/99Kr10r2gcc2QvWgTD4OmXughbfLRB+1qSeOYL2AqrNLPFSiOq vtx+CaaV4OyH4p+PUUe/p2bwIaL37fmPTskJ2cdgqf3/nXZ/zk5nM+uk79prNdmsZpjh4akHY pPMhkzrW72I4f+NGMtLTs8mHuSEto7+l2Br7n/igRee94yrhfUdWreststckzcpJ2kO86RwjA 6OLGM++8DMj5NORcq8p5JqNHfxG+R2Td8SZPdmkQSquDK6a97Sj+E8DilTitosnl+wB1AUXzr 0bRd0TrI4FzKLY5yL2dcz8QHPQRqLt1Nrjmk29BhRIpWrU5R5PNQf2PCjJ8aGxxO/asEOyqKK NlFuGLR14jpE8JcBudDgITQlIQ+TUHVpZQFsOsBWzejDU7Jov2gkVKEb/JT1Hkggr2hbkXj+p JielMtEUotUDxQwVwemCSlKbLs8ChONEgOBLh1P/nn3pOf4a5vcpwUCCEX2w7OjareECvjNgw Th7Yq+vXKXdJ7yy7enMerejCDezhVbXhw5cWB7XDh/J+sQlKfk7Miz1J+e9st3fY6b/k= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Building without CONFIG_PM results in a harmless warning from slightly incorrect #ifdef guards: drivers/media/platform/vsp1/vsp1_drv.c:525:12: error: 'vsp1_pm_runtime_resume' defined but not used [-Werror=unused-function] drivers/media/platform/vsp1/vsp1_drv.c:516:12: error: 'vsp1_pm_runtime_suspend' defined but not used [-Werror=unused-function] This removes the existing #ifdef and instead marks all four PM functions as __maybe_unused. Signed-off-by: Arnd Bergmann Fixes: 1e6af546ee66 ("[media] v4l: vsp1: Implement runtime PM support") --- drivers/media/platform/vsp1/vsp1_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index e655639af7e2..0c7fd43d6fb7 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -491,8 +491,7 @@ void vsp1_device_put(struct vsp1_device *vsp1) * Power Management */ -#ifdef CONFIG_PM_SLEEP -static int vsp1_pm_suspend(struct device *dev) +static int __maybe_unused vsp1_pm_suspend(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); @@ -502,7 +501,7 @@ static int vsp1_pm_suspend(struct device *dev) return 0; } -static int vsp1_pm_resume(struct device *dev) +static int __maybe_unused vsp1_pm_resume(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); @@ -511,9 +510,8 @@ static int vsp1_pm_resume(struct device *dev) return 0; } -#endif -static int vsp1_pm_runtime_suspend(struct device *dev) +static int __maybe_unused vsp1_pm_runtime_suspend(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); @@ -522,7 +520,7 @@ static int vsp1_pm_runtime_suspend(struct device *dev) return 0; } -static int vsp1_pm_runtime_resume(struct device *dev) +static int __maybe_unused vsp1_pm_runtime_resume(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); int ret;