From nobody Tue Dec 2 02:58:24 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42AC31CEAC2; Tue, 18 Nov 2025 00:51:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763427100; cv=none; b=grxBKOOfG4TdC/s4XGA/LPTQqpzNln8Okw123sPbFKTHdMwVMCbTxs2JQg8vjvw9MWnxSNnXMgj3GZdgskbaRWZkquiIAW8f73bq0Leg7UJ0Y47AkjWuwKTQWVGB2+5iIL8a7nOgO4uPbzlL2dBSjCc9Ch6HTtCqQmh/OJ5mZ7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763427100; c=relaxed/simple; bh=sgcrLnGm3+Bbp+1Awn9kwG362Rqp8d/CDhH6WRqtT+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HX3rn4wUjsNJG2kl7/ORrBOlpev7GeYSt1gpFbmKKAKFC82B5CzFAU7O85wT/Z6zoBlu31eHjYrRNBxS58UKkSp5qMfMNgMWlG56bkhTOGt4VbkT+R9GdC5dmtE0rHw5lPRxYW8yoRzhEvIPVf9Hn7KedLf6sT+xDpzgr7MbQ5g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IsWzXRyC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IsWzXRyC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC583C2BCC9; Tue, 18 Nov 2025 00:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763427099; bh=sgcrLnGm3+Bbp+1Awn9kwG362Rqp8d/CDhH6WRqtT+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IsWzXRyCK9isjIMpLbbmO/Hhm+emJSuG0Hxpvdr2a2shuyiUk4fuGzYDAmY3no8mL TF0A2V/cJTgHCyafPL25WX7NYstNN2xMxyF98tN9U7oUkTgqqCROSFsCvyxW1KxwlE 14+MwomUh0aLK6/A6OtAZOcpM96yMt+Msa0HYrOaDjuV+jlvezjD6Ey7YzXp/UkvRM r7VTcA1EzYQaRSLvMB/EoUCm4Y7vLyVaxqvLjup6m10NzHWWGWx4b3n0GNX29Y2qZ9 CYW8FTWzLTI4UpEKejX1hBcdDAH0bJ9aX6pnefslUTO6Z1/K3YQfyRe3zFuGgUYyKv GAi5IApyFLJEw== 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 14/15] gpio: xilinx: Use modern PM macros Date: Tue, 18 Nov 2025 08:32:28 +0800 Message-ID: <20251118003229.26636-15-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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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-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); } =20 -static int __maybe_unused xgpio_suspend(struct device *dev) +static int xgpio_suspend(struct device *dev) { struct xgpio_instance *gpio =3D dev_get_drvdata(dev); struct irq_data *data =3D irq_get_irq_data(gpio->irq); @@ -327,7 +327,7 @@ static void xgpio_irq_ack(struct irq_data *irq_data) { } =20 -static int __maybe_unused xgpio_resume(struct device *dev) +static int xgpio_resume(struct device *dev) { struct xgpio_instance *gpio =3D dev_get_drvdata(dev); struct irq_data *data =3D irq_get_irq_data(gpio->irq); @@ -343,7 +343,7 @@ static int __maybe_unused xgpio_resume(struct device *d= ev) return 0; } =20 -static int __maybe_unused xgpio_runtime_suspend(struct device *dev) +static int xgpio_runtime_suspend(struct device *dev) { struct xgpio_instance *gpio =3D dev_get_drvdata(dev); =20 @@ -352,7 +352,7 @@ static int __maybe_unused xgpio_runtime_suspend(struct = device *dev) return 0; } =20 -static int __maybe_unused xgpio_runtime_resume(struct device *dev) +static int xgpio_runtime_resume(struct device *dev) { struct xgpio_instance *gpio =3D dev_get_drvdata(dev); =20 @@ -360,9 +360,8 @@ static int __maybe_unused xgpio_runtime_resume(struct d= evice *dev) } =20 static const struct dev_pm_ops xgpio_dev_pm_ops =3D { - 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) }; =20 /** @@ -682,7 +681,7 @@ static struct platform_driver xgpio_plat_driver =3D { .driver =3D { .name =3D "gpio-xilinx", .of_match_table =3D xgpio_of_match, - .pm =3D &xgpio_dev_pm_ops, + .pm =3D pm_ptr(&xgpio_dev_pm_ops), }, }; =20 --=20 2.51.0