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 29F84CF394B for ; Wed, 19 Nov 2025 16:52:09 +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=0q7TJ9zCNQo5CoujH0iilORAG5PxwmhjdMW8e6a1FbM=; b=lxg0eQbP5T0aS9/JRa6wycFLDZ HpnosnGm5epWL3OzV9ruboF7cdDCwahofi5j+jYh9HsoXC0hQzOkXWkuZli0SrjOGXwNpRJlcr9X5 M/Rt0bYSoLIj0xVaFklQXcRXCCemk8l0mdXsS+aAH6Hc1UfBquZ+1Xwuz8WtvPA5y9YIofBKGsm96 nnLBspw4ecgYxbz5/jByOMkP4M/tXKigml4a6aih62cOCoB9xuZ/RuZ+ZMD+CuQLnCFDuaUl5r6r8 j8Eobfod61vDRCmhuOlhtKxzxN9J25bcAxM+t12ykHJn6T7sefv15vBH7C7ZNHrPuc0LSveNDWsjY eqwSe/ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vLlPY-00000003khW-2z90; Wed, 19 Nov 2025 16:52:04 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vLlPT-00000003kc4-3rqc for linux-arm-kernel@lists.infradead.org; Wed, 19 Nov 2025 16:52:01 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 98849406CE; Wed, 19 Nov 2025 16:51:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A57CDC116B1; Wed, 19 Nov 2025 16:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763571119; bh=ylQueHQq0vE869TT1EQhJyrzWInPZ0un96UL9qOXAPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jnfUFH7bCDMpjoAy7UZiCRZp1tbM63OJHTgBv01qYSViy40CfvNVH4o8iuF7ovE5T cw8EEdTkizq6dUdG0yrKXtj46JQAB9Gpotj2dYqW5IwD1Hlt2zJh+jmAxM63UBKV8x /3USsajeoAyaCxHzULgSehXi2Qyfuqf0LY7crOYOUDszPH8ChSOitXZu27eBr7wDq0 s2+wIgxiJruNI7I6rwB/5snPPOzwh+N5TqWi/ZR6fPlyU7+5g7G9+zNYv6Td/R2al3 7l7EqT8R4T0Y55xUiGS/mScqyFSAXNa4j6/Ivt73gMWV7WsDw2Cjdfkbw6A4E7Lhqn XMt0mXPSeifrg== 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 Subject: [PATCH v4 09/15] gpio: omap: Use modern PM macros Date: Thu, 20 Nov 2025 00:33:21 +0800 Message-ID: <20251119163327.16306-10-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251119163327.16306-1-jszhang@kernel.org> References: <20251119163327.16306-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-20251119_085200_008439_0AF3D6AE X-CRM114-Status: GOOD ( 14.36 ) 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 --- 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