From nobody Sat Sep 21 23:07:04 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B263AC43334 for ; Thu, 23 Jun 2022 02:52:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377899AbiFWCws (ORCPT ); Wed, 22 Jun 2022 22:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377757AbiFWCwI (ORCPT ); Wed, 22 Jun 2022 22:52:08 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DA7443488 for ; Wed, 22 Jun 2022 19:52:06 -0700 (PDT) Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LT4VD4hzZz1KC7y; Thu, 23 Jun 2022 10:49:56 +0800 (CST) Received: from dggpeml100012.china.huawei.com (7.185.36.121) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 23 Jun 2022 10:52:04 +0800 Received: from zelda.huawei.com (10.175.103.14) by dggpeml100012.china.huawei.com (7.185.36.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 23 Jun 2022 10:52:03 +0800 From: Jin Xiaoyun To: , , , , CC: , , , "Jin Xiaoyun" Subject: [PATCH v2 -next] soc: mediatek: SVS: Use the new PM macros Date: Thu, 23 Jun 2022 11:09:31 +0800 Message-ID: <20220623030931.2816013-1-jinxiaoyun2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220622013410.2786760-1-jinxiaoyun2@huawei.com> References: <20220622013410.2786760-1-jinxiaoyun2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.103.14] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml100012.china.huawei.com (7.185.36.121) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: =E2=80=98svs_resume=E2=80=99= defined but not used [-Werror=3Dunused-function] drivers/soc/mediatek/mtk-svs.c:1481:12: error: =E2=80=98svs_suspend=E2=80= =99 defined but not used [-Werror=3Dunused-function] Signed-off-by: Jin Xiaoyun Reviewed-by: Matthias Brugger --- 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 =3D { .probe =3D svs_probe, .driver =3D { .name =3D "mtk-svs", - .pm =3D &svs_pm_ops, + .pm =3D pm_sleep_ptr(&svs_pm_ops), .of_match_table =3D of_match_ptr(svs_of_match), }, }; -- 2.25.1