From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EA0DCFD2F6 for ; Mon, 24 Nov 2025 00:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8W2Lly6b8FZVCU+TCc9apGxXsKTIDCO8sVy0SZUVuK8=; b=xjj9FXpaf9plCcxfaSIGAD/5sC v1tD/dCyv9T0Ickwt5OyNFdx3MmkHqFL/ppYw2p9yZdgrNg43jgMmqHn6TVDZgatoHYn8kAQRdfOJ vnohqYSHkHOO3VrWPVIb9dslYSm6MPRm1ct6I/LiwADRIS9/6Lx+4Na9YKTEaHhMBLBeKsXuoXDN5 XPFY8cubS4JizMZM/kMZUlqv2ZUKbyv5PTB/AgCeSbBF85cjo/FT55wLy6zXykNYEeD7Vs7TbtpBq XNcTr7Akc6dHm9naSyWeNPWCSiHXGhAGZVi2jgH61IprG0B8JpeCgExkw/ONBV31u1EK5+qYEErVv 8GoIYCLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vNKcK-0000000ArKq-1KHr; Mon, 24 Nov 2025 00:39:44 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vNKc9-0000000ArCV-45Rl for linux-arm-kernel@lists.infradead.org; Mon, 24 Nov 2025 00:39:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id A573D443BB; Mon, 24 Nov 2025 00:39:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1D09C16AAE; Mon, 24 Nov 2025 00:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763944773; bh=kv6Bgi1yHxmGklUE6nerjA6CCGgjdEkA/o1x5keS5d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s/krqGe0C/3dVgHPgzKZTe9NmR3K+fYdHcNmadEUxWvbr1oEL6bwTSPhgPhdGL38v OiYsZhWKtpCTvJfHlnfNVNi5KsnPZ7IbJ7aHApScsgj+0AR47MAxv6ZuGTZbLJMe5b EpJChbkTKtzgZID60bqSRJU687UietN7qBk1H8bRr2NDNyNgRJL3uCG33VD7sFn0pF 0gOtoM0g5s0aBhTk1+4vc/0/FXtp7iNoZA0qsyUf8y6n7ft+KomRySc0Rq7sfOSxXB Icv30oTHAvObuLWKTAVfvdlT77xwv2gAmLbnmm2Q10Y6ln0+r72iEFu7bLqSBeFARz lWaWByG3eY0sw== From: Jisheng Zhang To: Doug Berger , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Linus Walleij , Bartosz Golaszewski , Hoan Tran , Andy Shevchenko , Daniel Palmer , Romain Perier , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Robert Jarzmik , Kunihiko Hayashi , Masami Hiramatsu , Shubhrajyoti Datta , Srinivas Neeli , Michal Simek Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Andy Shevchenko Subject: [PATCH v5 08/14] gpio: omap: Use modern PM macros Date: Mon, 24 Nov 2025 08:20:59 +0800 Message-ID: <20251124002105.25429-9-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251124002105.25429-1-jszhang@kernel.org> References: <20251124002105.25429-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251123_163935_297322_498A69CA X-CRM114-Status: GOOD ( 13.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused Signed-off-by: Jisheng Zhang Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-omap.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index a268c76bdca6..e136e81794df 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1503,7 +1503,7 @@ static void omap_gpio_remove(struct platform_device *pdev) clk_unprepare(bank->dbck); } -static int __maybe_unused omap_gpio_runtime_suspend(struct device *dev) +static int omap_gpio_runtime_suspend(struct device *dev) { struct gpio_bank *bank = dev_get_drvdata(dev); unsigned long flags; @@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused omap_gpio_runtime_resume(struct device *dev) +static int omap_gpio_runtime_resume(struct device *dev) { struct gpio_bank *bank = dev_get_drvdata(dev); unsigned long flags; @@ -1529,7 +1529,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev) return 0; } -static int __maybe_unused omap_gpio_suspend(struct device *dev) +static int omap_gpio_suspend(struct device *dev) { struct gpio_bank *bank = dev_get_drvdata(dev); @@ -1541,7 +1541,7 @@ static int __maybe_unused omap_gpio_suspend(struct device *dev) return omap_gpio_runtime_suspend(dev); } -static int __maybe_unused omap_gpio_resume(struct device *dev) +static int omap_gpio_resume(struct device *dev) { struct gpio_bank *bank = dev_get_drvdata(dev); @@ -1554,9 +1554,8 @@ static int __maybe_unused omap_gpio_resume(struct device *dev) } static const struct dev_pm_ops gpio_pm_ops = { - SET_RUNTIME_PM_OPS(omap_gpio_runtime_suspend, omap_gpio_runtime_resume, - NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(omap_gpio_suspend, omap_gpio_resume) + RUNTIME_PM_OPS(omap_gpio_runtime_suspend, omap_gpio_runtime_resume, NULL) + LATE_SYSTEM_SLEEP_PM_OPS(omap_gpio_suspend, omap_gpio_resume) }; static struct platform_driver omap_gpio_driver = { @@ -1564,7 +1563,7 @@ static struct platform_driver omap_gpio_driver = { .remove = omap_gpio_remove, .driver = { .name = "omap_gpio", - .pm = &gpio_pm_ops, + .pm = pm_ptr(&gpio_pm_ops), .of_match_table = omap_gpio_match, }, }; -- 2.51.0