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 F06F1CFD2F6 for ; Mon, 24 Nov 2025 00:40:04 +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=8sQqHIiFTkl/MkWAgyuqCM/ScXK1gXEDF6EPkGHH3/g=; b=Y+H/nTjnNKwQWt9Iu/5AIG3VuF ZQO9jSSGII4nXVRen/A3ccqtAccVnf4rvQB1H34nUZ5FNlk65KzQFOw50i9wavddAkq+nQO4GEK5b 4gsLS5Z/j4yAhP5N6+oOCy3WxWbxkNYOPX/XpfOG0iNWHDgyR5NTwBal2duXVge8cbuay/wjVTlbq XmzaaqFnUI//c4ZTHoi/Oc2ccXq/XW12HhJlxzLg+fZdVnyep5zff7ZL0SQ+T6TAtsZIPycseJ787 pdN7VeEMaxoS2tk5MbDzgNaQMJc+EFo/KIduJoPFfzV27XnE5QaAROZQou7VWJPnSYux1xTYgMJrd DvvRQftg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vNKcX-0000000ArZ5-38WC; Mon, 24 Nov 2025 00:39:57 +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 1vNKcI-0000000ArIY-1XzT for linux-arm-kernel@lists.infradead.org; Mon, 24 Nov 2025 00:39:43 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 161BA407F2; Mon, 24 Nov 2025 00:39:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38862C19421; Mon, 24 Nov 2025 00:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763944781; bh=m+0s3zR3Jimd2DLICKq/0mKXn1YtbWJGpOHLKqx4PmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rFlaZeef+FfC49uYvW+DiJPLHwNO1nfTB7xhSDgl8bGejLmyjtK0dTNE8jl1hmNw+ aleoV1tCfvhmyHqeTYmoCnL+mMujbz7LF2rET4bcPi8J4UJnFMy52UIyN0mKN8V0P1 ZB4TJb1zy7FNZU4v8l8VopT4m3SizwjwJzcGflfNGcpQ9QtcsWaMBXMxvvjhOB48Sj w3HxNIXMhZ+Q38BSFLl3f+B3ktYSbANwMQIzQzrkHOnuPbd5eHn5ofwwhLIcwLUrts nCFQ2+Hh+OQ+kI4NXzKHDoRFElmy93dOXeGLJbB46xOw/Qq6ap2v7FigDLGGtH96iS N8d4DwOLyG1rw== 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 v5 10/14] gpio: tqmx86: Use modern PM macros Date: Mon, 24 Nov 2025 08:21:01 +0800 Message-ID: <20251124002105.25429-11-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_163942_438782_E9956653 X-CRM114-Status: GOOD ( 13.93 ) 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-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..eedfc0e371e3 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_ptr(&tqmx86_gpio_dev_pm_ops), }, .probe = tqmx86_gpio_probe, }; -- 2.51.0