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 D62C0CEBF92 for ; Tue, 18 Nov 2025 00:51:35 +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=u1i33cxdaA095+4EVzMFSHGagfysyX/Axd8u/RYOq/w=; b=0cHY5BdmfJDUEntfFCGCSmzo9v gsizUINXqajZo98dBSmRYdErEQyB/L0v825rFDNcR3jRX4fgVo8QaD3rvFSS6AkUhn57WftgzT6NB bQoH/+gvveoW9McNHKQRiJk3gtLx97tgY4Nwjpzznji0TUrVKgha1zsVNemc67RQKsoCcn0Q9wF9s SHOnDMF93ZqB5evU09zcMkmN+9FF6NQNXpMWgpa9x0mJLv2morpuFH/MckGeQzhfexvpvq+Yx2h4F E9DICzshRtMJw0xgvBWO8Y5FpMGMxaLn4qQFhjAGnuulpHzF49BcPl0VkN4iZ1tq+MXR3Nq+2L5Oh ZpHeuraQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vL9wO-0000000H4WP-14Nk; Tue, 18 Nov 2025 00:51:28 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vL9wK-0000000H4ST-2Ry9 for linux-arm-kernel@lists.infradead.org; Tue, 18 Nov 2025 00:51:24 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id DFBF5601B0; Tue, 18 Nov 2025 00:51:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDD7DC2BCB7; Tue, 18 Nov 2025 00:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763427083; bh=El1hxWSbR3GmHln8ZOHlWcFS/7CJ8C4SvNQbzWmhhGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tQHIY8FFl8C33JofqotXTXmXAkvXecRsBuM5it5qqHEY8LkeUlIvcaPDvBLNhEC8H uDOc8UUG/9giAms/keb8FL9uDAsYB6TePrEYiAMjXavV1YpUlUPjbFS+XsjfnVL7Fl iUhnJ+NiRqA+pXKy/rFCeqMRijwh4Nd0IH5OzYLFohggimMRfR7moisDSpC3mX1/t4 Xb+aN17DupfhOwJXjAZ6COlTl3ykgMVYUZP1KbgtHxM2XZW3z1rbxlSakEFqv3ffl6 dlSdq5KrVnW4Jep0O70GPyFMiqTZnJ2eWwh9uimKljHuedy9Ni3ci4HwUw4RSHW8Fw U7mf4XQDtp3dA== 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 v2 11/15] gpio: tqmx86: Use modern PM macros Date: Tue, 18 Nov 2025 08:32:25 +0800 Message-ID: <20251118003229.26636-12-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251118003229.26636-1-jszhang@kernel.org> References: <20251118003229.26636-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- drivers/gpio/gpio-tqmx86.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c index 27dd09273292..d79f515137a5 100644 --- a/drivers/gpio/gpio-tqmx86.c +++ b/drivers/gpio/gpio-tqmx86.c @@ -279,19 +279,18 @@ static void tqmx86_gpio_irq_handler(struct irq_desc *desc) } /* Minimal runtime PM is needed by the IRQ subsystem */ -static int __maybe_unused tqmx86_gpio_runtime_suspend(struct device *dev) +static int tqmx86_gpio_runtime_suspend(struct device *dev) { return 0; } -static int __maybe_unused tqmx86_gpio_runtime_resume(struct device *dev) +static int tqmx86_gpio_runtime_resume(struct device *dev) { return 0; } static const struct dev_pm_ops tqmx86_gpio_dev_pm_ops = { - SET_RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend, - tqmx86_gpio_runtime_resume, NULL) + RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend, tqmx86_gpio_runtime_resume, NULL) }; static void tqmx86_init_irq_valid_mask(struct gpio_chip *chip, @@ -425,7 +424,7 @@ static int tqmx86_gpio_probe(struct platform_device *pdev) static struct platform_driver tqmx86_gpio_driver = { .driver = { .name = "tqmx86-gpio", - .pm = &tqmx86_gpio_dev_pm_ops, + .pm = pm_sleep_ptr(&tqmx86_gpio_dev_pm_ops), }, .probe = tqmx86_gpio_probe, }; -- 2.51.0