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 8733ECA0EDC for ; Wed, 20 Aug 2025 20:50:00 +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=3EHID2hrABQC+BwzHXPsX4lzatRJpQZngM5mEmWwni0=; b=P2uhJUCs0zMOU2+i4kwQ2axtJA JVH0QxeJJIIbPhtZNmNyCxVeg7KEkJd+JDRYuAKNFL8dazCeUxtx/yyyJZ+DaqgfPZ4b9QiZXKm/J Gj2G31GwRjSJRDLE+97NuDejasxJeNYo6TOhZuvA41QtB7DtZhMXzx+i7vCqrTnpKO1dS6/ff1S+A qJRPhAfIzDDYmIZLMfVMgzPoDiJ9b9M0VNeekSxy8s0VNfp23I29L8K+BG6S2yF260l4mOGn+inqM yw1sKnbAksoKmnCKImcei+9Cq1lDa5IEeILlZlhVdFwxeJff31s13HEnU3BvV+1CcocDGvkKgtJaR mqocwpYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uopkl-0000000EsKU-0j63; Wed, 20 Aug 2025 20:49:51 +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 1uolE2-0000000EKJ4-3Vwe for linux-arm-kernel@lists.infradead.org; Wed, 20 Aug 2025 15:59:47 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 7E622437FC; Wed, 20 Aug 2025 15:59:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D717AC116C6; Wed, 20 Aug 2025 15:59:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755705576; bh=Umn5vwhGD2cJbBze7Y+K5YYl5ku0sduec7+7WcHtJDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YJB7FAyJmFIy/7bU6Y6i71u2o8MXfowgFrIDXqIk6YPIU/lj6nyoRUOXhv3daXST0 1WRNZLp8D+8M12Ww6v0xaiKqbZ63Ay2gkgmI4XLJImrTQ58j1Ktr1AV/0XU7MPpyWO bIUUL54nRyeY4an1pQCOq2T+0U2v+YdeUlvRUC0gRRY5tcz7O9RNA83vs1smq6pTtb A2BvVA9odZs4EQO3oT9BnUBbeydgFtP9ND05ez31VZ7aI67jCIPD03JgP/shTTLQcv BODBh4bhLBUxCtWuwnlTENxKEq9nErah3SNyaWQaaC5wifuk5ZY5pBZ1a9928FT/RG MVIS2LTeazW6w== From: Jisheng Zhang To: Doug Berger , Florian Fainelli , Linus Walleij , Bartosz Golaszewski , Michael Buesch , 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: Broadcom internal kernel review list , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux@ew.tq-group.com Subject: [PATCH 12/16] gpio: tqmx86: Use modern PM macros Date: Wed, 20 Aug 2025 23:40:33 +0800 Message-ID: <20250820154037.22228-13-jszhang@kernel.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250820154037.22228-1-jszhang@kernel.org> References: <20250820154037.22228-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-20250820_085946_894532_41D0D5F5 X-CRM114-Status: GOOD ( 13.81 ) 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.50.1