[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200304145412.33936-1-vincenzo.frascino@arm.com>
Date: Wed, 4 Mar 2020 14:54:12 +0000
From: Vincenzo Frascino <vincenzo.frascino@....com>
To: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: Vincenzo Frascino <vincenzo.frascino@....com>,
"James (Qian) Wang" <james.qian.wang@....com>,
Liviu Dudau <liviu.dudau@....com>,
Mihail Atanassov <mihail.atanassov@....com>,
Brian Starkey <brian.starkey@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
Subject: [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM
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" <james.qian.wang@....com>
Cc: Liviu Dudau <liviu.dudau@....com>
Cc: Mihail Atanassov <mihail.atanassov@....com>
Cc: Brian Starkey <brian.starkey@....com>
Cc: David Airlie <airlied@...ux.ie>
Cc: Daniel Vetter <daniel@...ll.ch>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
---
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)
{
--
2.25.1
Powered by blists - more mailing lists