From: Matthias Brugger <matthias.bgg@gmail.com>
To: Jin Xiaoyun <jinxiaoyun2@huawei.com>,
angelogioacchino.delregno@collabora.com, khilman@baylibre.com,
zhengbin13@huawei.com, gaochao49@huawei.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 -next] soc: mediatek: SVS: Use the new PM macros
Date: Thu, 23 Jun 2022 13:59:49 +0200 [thread overview]
Message-ID: <d17549d3-a111-53b4-4576-2f5b6581c830@gmail.com> (raw)
In-Reply-To: <20220623030931.2816013-1-jinxiaoyun2@huawei.com>
On 23/06/2022 05:09, Jin Xiaoyun wrote:
> 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@huawei.com>
> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.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),
Why do we need that? From my understanding DEFINE_SIMPLE_DEV_PM_OPS() sets
runtime_suspend_fn, runtime_resume_fn and idle_fn to NULL.
Regards,
Matthias
> .of_match_table = of_match_ptr(svs_of_match),
> },
> };
> --
> 2.25.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-23 12:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 1:34 [PATCH -next] soc: mediatek: SVS: Make svs_resume and svs_suspend defined when CONFIG_PM_SLEEP is y Jin Xiaoyun
2022-06-22 13:55 ` Matthias Brugger
2022-06-23 3:09 ` [PATCH v2 -next] soc: mediatek: SVS: Use the new PM macros Jin Xiaoyun
2022-06-23 11:59 ` Matthias Brugger [this message]
2022-06-23 12:03 ` Matthias Brugger
2022-07-07 8:26 ` Matthias Brugger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d17549d3-a111-53b4-4576-2f5b6581c830@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=gaochao49@huawei.com \
--cc=jinxiaoyun2@huawei.com \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=zhengbin13@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).