From nobody Tue Dec 2 01:24:50 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 67B9D19F41C; Mon, 24 Nov 2025 00:39:54 +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=1763944795; cv=none; b=WYmBy7DrOp12xbxEX5oOyQXoXzzIvNYD7wLlF6u+dOKbkrkk7rASyIlBKHWJ0wF6b76h7Bjap0i2iWDqMYSldy0u91Vks6aJOebrWHmAGuY2Uw8VkeHZRaQHSV1xz2C1Efh5mWDTxnny3InieLf3Q831ifnFlvQ9bh4fTDOB5CU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763944795; c=relaxed/simple; bh=tmbVFre4tZko40JOclR4P87MLs3EhlcBKGfS24+8a8A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xpd0EoUZCyqpmpIb0F11K9IJRDIoA2SEmhj8lfxAGVbZ0hh7/wrVoQscIqt+cOOgrGhpd9ygwE8qNgtPEZyKkgm4AC+tCUmCsIXbowEIc/aodNm0DVRV6GX7n46VCNG/igsUPfM9NlWE8l1kZAtirBcmzCc6V16GpOD9o8+FjoE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LRi61CRD; 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="LRi61CRD" 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> 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 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); } =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