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 1FFD0CFD31E for ; Mon, 24 Nov 2025 00:40:06 +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=K5URyMMYlKd3jrWwLxAJqb2eGB2PLqy34lK17YdTeB4=; b=ma2nfmrkdMPnITbEBrJMtznhUN TodfzOQJYEMVNVwzzrUjRmVQWVkmaHNljPMg68ATYd7Tnmzv6CZF596h2hRc0gvYkGmoHZ2ir4kM5 Byix/6wiBGsMCH1dZ6rui4bf2i2Y65PXBT+MhQvcX8ZpjVOQjqqP84eVeJ9BWpWEjG0KWwWkJytHV v1DTap8dS8Ewhww+IRFjKKyhQXwJg6whC9AyPVRrDFl+k+kciFBqRwOg3b0xf2VFR2UvPp9uX7E5J 4QNArMN/znT9offwjhrQieCCgHdhNke7N9gy9LFs/KhSR/MkcO1smipLHN4+vtDD1jlnrNn7Fg+qR aiHRiIeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vNKcZ-0000000Arbq-2AKZ; Mon, 24 Nov 2025 00:39:59 +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 1vNKcV-0000000ArWX-1FRK for linux-arm-kernel@lists.infradead.org; Mon, 24 Nov 2025 00:39:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id E466643DA4; Mon, 24 Nov 2025 00:39:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2D1CC116D0; Mon, 24 Nov 2025 00:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763944794; bh=tmbVFre4tZko40JOclR4P87MLs3EhlcBKGfS24+8a8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LRi61CRDpXmyx/baVYTbnK5OEiudN0xVJJDNNoyZKSU/YtCj6emPcD52zDJY3C2J9 CXepScvN7orZLoH/8iAK9VDp+PBIIwLuXuxUAUJLvOoD2MomNhQ29Ct0zXG9/TWywH UDR0k6TG+uRH58G/4dMgRgelN/GHN8bkbuir1MjFOpGGKlf8TLwtZOP3f2yYR0s0y8 4G+JvxMO450itzVCuM+oRr6jBIpfJimTQheAg09iwbfI1l2sssUmIAjXSm3RV0BWMv tNP44McEGSXBiDIT5FUCC5mEBS9uZHlra1Fi+apQRE7hYzeRkNi06aSJ++d/7UQvia YkNiJUWTPfAGg== 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 13/14] gpio: xilinx: Use modern PM macros Date: Mon, 24 Nov 2025 08:21:04 +0800 Message-ID: <20251124002105.25429-14-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_163955_373316_DD7953B0 X-CRM114-Status: GOOD ( 13.06 ) 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-xilinx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index 83675ac81077..be4b4d730547 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -286,7 +286,7 @@ static void xgpio_free(struct gpio_chip *chip, unsigned int offset) pm_runtime_put(chip->parent); } -static int __maybe_unused xgpio_suspend(struct device *dev) +static int xgpio_suspend(struct device *dev) { struct xgpio_instance *gpio = dev_get_drvdata(dev); struct irq_data *data = irq_get_irq_data(gpio->irq); @@ -327,7 +327,7 @@ static void xgpio_irq_ack(struct irq_data *irq_data) { } -static int __maybe_unused xgpio_resume(struct device *dev) +static int xgpio_resume(struct device *dev) { struct xgpio_instance *gpio = dev_get_drvdata(dev); struct irq_data *data = irq_get_irq_data(gpio->irq); @@ -343,7 +343,7 @@ static int __maybe_unused xgpio_resume(struct device *dev) return 0; } -static int __maybe_unused xgpio_runtime_suspend(struct device *dev) +static int xgpio_runtime_suspend(struct device *dev) { struct xgpio_instance *gpio = dev_get_drvdata(dev); @@ -352,7 +352,7 @@ static int __maybe_unused xgpio_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused xgpio_runtime_resume(struct device *dev) +static int xgpio_runtime_resume(struct device *dev) { struct xgpio_instance *gpio = dev_get_drvdata(dev); @@ -360,9 +360,8 @@ static int __maybe_unused xgpio_runtime_resume(struct device *dev) } static const struct dev_pm_ops xgpio_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(xgpio_suspend, xgpio_resume) - SET_RUNTIME_PM_OPS(xgpio_runtime_suspend, - xgpio_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(xgpio_suspend, xgpio_resume) + RUNTIME_PM_OPS(xgpio_runtime_suspend, xgpio_runtime_resume, NULL) }; /** @@ -682,7 +681,7 @@ static struct platform_driver xgpio_plat_driver = { .driver = { .name = "gpio-xilinx", .of_match_table = xgpio_of_match, - .pm = &xgpio_dev_pm_ops, + .pm = pm_ptr(&xgpio_dev_pm_ops), }, }; -- 2.51.0