From patchwork Wed Mar 4 14:54:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 11421279 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C596B138D for ; Thu, 5 Mar 2020 08:14:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADB2E2073D for ; Thu, 5 Mar 2020 08:14:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADB2E2073D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 842446EAEE; Thu, 5 Mar 2020 08:14:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id AE4E36E190 for ; Wed, 4 Mar 2020 14:54:27 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4C8B431B; Wed, 4 Mar 2020 06:54:27 -0800 (PST) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16F413F6CF; Wed, 4 Mar 2020 06:54:25 -0800 (PST) From: Vincenzo Frascino To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM Date: Wed, 4 Mar 2020 14:54:12 +0000 Message-Id: <20200304145412.33936-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 05 Mar 2020 08:14:30 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mihail Atanassov , David Airlie , Liviu Dudau , "James \(Qian\) Wang" , Vincenzo Frascino Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" komeda_rt_pm_suspend() and komeda_rt_pm_resume() are compiled only when CONFIG_PM is enabled. Having it disabled triggers the following warning at compile time: linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12: warning: ‘komeda_rt_pm_resume’ defined but not used [-Wunused-function] static int komeda_rt_pm_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~ linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12: warning: ‘komeda_rt_pm_suspend’ defined but not used [-Wunused-function] static int komeda_rt_pm_suspend(struct device *dev) Make komeda_rt_pm_suspend() and komeda_rt_pm_resume() dependent on CONFIG_PM to address the issue. Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Vincenzo Frascino Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index ea5cd1e17304..dd3ae3d88687 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -146,6 +146,7 @@ static const struct of_device_id komeda_of_match[] = { MODULE_DEVICE_TABLE(of, komeda_of_match); +#ifdef CONFIG_PM static int komeda_rt_pm_suspend(struct device *dev) { struct komeda_drv *mdrv = dev_get_drvdata(dev); @@ -159,6 +160,7 @@ static int komeda_rt_pm_resume(struct device *dev) return komeda_dev_resume(mdrv->mdev); } +#endif /* CONFIG_PM */ static int __maybe_unused komeda_pm_suspend(struct device *dev) {