From patchwork Mon Jul 17 17:28:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 703967 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 4F64AC04E69 for ; Mon, 17 Jul 2023 17:29:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231442AbjGQR3z (ORCPT ); Mon, 17 Jul 2023 13:29:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231297AbjGQR3v (ORCPT ); Mon, 17 Jul 2023 13:29:51 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E5BD171A; Mon, 17 Jul 2023 10:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689614965; x=1721150965; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=igrPqVNDiG+d18EW9HPDbcv/hLv1Vv/Njn91XssjJ2c=; b=H15w2/DWOiuPX++WaDRYPn47gSeX2+2rjKc55ej15uLxZJAc7fLtZmfr ak/UppvwYRl3LOr/epx5EH0nzDVXEU7AZYdUUdFfiQppvyj4pChe9m4XI sh1R7K+a6HLL0l08+Aga9EkDgnSDhdRtSRbgzSp4gc6tA542tG3By2CTE 7WQXGoxDkz1/kl34f8MGqB25Jg/bUySHYh7VM3KFA31wqgQ65cWBzFxvk P4X+AmdCqOpzvpsmPhv5XDTAFwyPT5NpUImw6l59JaoR/5CRi9kq58SJ/ qWChHZ7eXeoGcXNX4IJgPFw13AWIL1Bow3PM3bMSSIMsZI+PvPTie8wEM A==; X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="355926981" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="355926981" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 10:28:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10774"; a="673604211" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="673604211" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 17 Jul 2023 10:28:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2D1F469F; Mon, 17 Jul 2023 20:28:40 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , Linus Walleij , Balsam CHIHI , Claudiu Beznea , Geert Uytterhoeven , Wolfram Sang , Thierry Reding , Paul Cercueil , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org Cc: Andy Shevchenko , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , Jonathan Hunter , "Rafael J. Wysocki" , Len Brown , Pavel Machek Subject: [PATCH v2 07/10] pinctrl: mediatek: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper Date: Mon, 17 Jul 2023 20:28:18 +0300 Message-Id: <20230717172821.62827-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230717172821.62827-1-andriy.shevchenko@linux.intel.com> References: <20230717172821.62827-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Since pm.h provides a helper for system no-IRQ PM callbacks, switch the driver to use it instead of open coded variant. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron --- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 5 +---- drivers/pinctrl/mediatek/pinctrl-paris.c | 9 +++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 665dec419e7c..2bf5082d3aa9 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -922,10 +922,7 @@ static int mtk_eint_resume(struct device *device) return mtk_eint_do_resume(pctl->eint); } -const struct dev_pm_ops mtk_eint_pm_ops = { - .suspend_noirq = mtk_eint_suspend, - .resume_noirq = mtk_eint_resume, -}; +DEFINE_NOIRQ_DEV_PM_OPS(mtk_eint_pm_ops, mtk_eint_suspend, mtk_eint_resume); static int mtk_pctrl_build_state(struct platform_device *pdev) { diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index 33d6c3fb7908..b1cbd5bafa2e 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -1119,24 +1119,21 @@ int mtk_paris_pinctrl_probe(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(mtk_paris_pinctrl_probe); -static int mtk_paris_pinctrl_suspend(struct device *device) +static int mtk_paris_suspend(struct device *device) { struct mtk_pinctrl *pctl = dev_get_drvdata(device); return mtk_eint_do_suspend(pctl->eint); } -static int mtk_paris_pinctrl_resume(struct device *device) +static int mtk_paris_resume(struct device *device) { struct mtk_pinctrl *pctl = dev_get_drvdata(device); return mtk_eint_do_resume(pctl->eint); } -const struct dev_pm_ops mtk_paris_pinctrl_pm_ops = { - .suspend_noirq = mtk_paris_pinctrl_suspend, - .resume_noirq = mtk_paris_pinctrl_resume, -}; +DEFINE_NOIRQ_DEV_PM_OPS(mtk_paris_pinctrl_pm_ops, mtk_paris_suspend, mtk_paris_resume); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("MediaTek Pinctrl Common Driver V2 Paris");