[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220623030931.2816013-1-jinxiaoyun2@huawei.com>
Date: Thu, 23 Jun 2022 11:09:31 +0800
From: Jin Xiaoyun <jinxiaoyun2@...wei.com>
To: <matthias.bgg@...il.com>,
<angelogioacchino.delregno@...labora.com>, <khilman@...libre.com>,
<zhengbin13@...wei.com>, <gaochao49@...wei.com>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
"Jin Xiaoyun" <jinxiaoyun2@...wei.com>
Subject: [PATCH v2 -next] soc: mediatek: SVS: Use the new PM macros
Use DEFINE_SIMPLE_DEV_PM_OPS() instead of the SIMPLE_DEV_PM_OPS()
macro, along with using pm_sleep_ptr() as this driver doesn't handle
runtime PM.
Fix build error:
drivers/soc/mediatek/mtk-svs.c:1515:12: error: ‘svs_resume’ defined but not used [-Werror=unused-function]
drivers/soc/mediatek/mtk-svs.c:1481:12: error: ‘svs_suspend’ defined but not used [-Werror=unused-function]
Signed-off-by: Jin Xiaoyun <jinxiaoyun2@...wei.com>
Reviewed-by: Matthias Brugger <matthias.bgg@...il.com>
---
v1->v2:
- Remove the #ifdef CONFIG_PM guard around the suspend/resume functions
- Use DEFINE_SIMPLE_DEV_PM_OPS along with using pm_sleep_ptr()
---
drivers/soc/mediatek/mtk-svs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index 606a00a2e57d..fae7376bd083 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -2381,13 +2381,13 @@ static int svs_probe(struct platform_device *pdev)
return ret;
}
-static SIMPLE_DEV_PM_OPS(svs_pm_ops, svs_suspend, svs_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(svs_pm_ops, svs_suspend, svs_resume);
static struct platform_driver svs_driver = {
.probe = svs_probe,
.driver = {
.name = "mtk-svs",
- .pm = &svs_pm_ops,
+ .pm = pm_sleep_ptr(&svs_pm_ops),
.of_match_table = of_match_ptr(svs_of_match),
},
};
--
2.25.1
Powered by blists - more mailing lists