From mboxrd@z Thu Jan 1 00:00:00 1970 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 775E7293B75; Wed, 19 Nov 2025 15:02:55 +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=1763564575; cv=none; b=cD280KfdJbZXhMjpp/tpugdL0U6r+p2lS2NWxaI1jJjHpzkjv0UVBliARi3m/5X/RrIOLWtNNberJgkkRjR7u/I+WFvqYtZDU4hXSA3wGqz98QIiLau2YbccGonEnQVpIfeaZdSQb0FBju0DvV1g36TdG0+qUn1S+lL/oIsexdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763564575; c=relaxed/simple; bh=Os+tBdcRNnMldaZHL0II0bLpAzonGthp4S2yNOuQoUg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mgMpmV0+LY9UX/PZzJEVNNZgkTR3rZ4WzHrQjkoB+UPzhweFxzX2smpd+x4/K1b7yYqrcbnWjwYwNThtlbnHNqKjjOwEeWR3kuoKvfWvqMAvAat1JcdGO/tZwiaOBWzndin4VHbMlOwXaVWRAaDrCae+Cce47qKWpHGD9ZJ5IFs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uiSZHAhN; 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="uiSZHAhN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87D5DC113D0; Wed, 19 Nov 2025 15:02:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763564574; bh=Os+tBdcRNnMldaZHL0II0bLpAzonGthp4S2yNOuQoUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uiSZHAhNRZfGjEuVovTiI4milsyYoDWr0fmeBulJYJ9B+EOPDWLIbK/dKJ8siG1SX m4nHj28g/fHQ0D2zv4ygBhsaE49kkqTULffHF2cz/XYU8Fu5yu1lQ+7D1d0tUQ/agx ZJO1VxPsHeE0UMistGeEPWLOIRuG23EAwEHJQQg+PQD204BG/q67UTIwPNwXo16XxT aMCXHu1qiwe8heGYlW9O3HMc4A+3Ucnmh0HWGk2QYeFSac+25sQRmhjU/K69qBkTlC JAJJNn2WtKMHcYY5GXmgMd2NqrRcXac+t+S8s4J+oywXJQ+PqxdT+iBqUFRlqmRDg2 8cbQArBu+CZig== 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 v3 12/15] gpio: uniphier: Use modern PM macros Date: Wed, 19 Nov 2025 22:43:24 +0800 Message-ID: <20251119144327.13345-13-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251119144327.13345-1-jszhang@kernel.org> References: <20251119144327.13345-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-uniphier.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index 197bb1d22b3c..0574dde5b5bb 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -426,7 +426,7 @@ static void uniphier_gpio_remove(struct platform_device *pdev) irq_domain_remove(priv->domain); } -static int __maybe_unused uniphier_gpio_suspend(struct device *dev) +static int uniphier_gpio_suspend(struct device *dev) { struct uniphier_gpio_priv *priv = dev_get_drvdata(dev); unsigned int nbanks = uniphier_gpio_get_nbanks(priv->chip.ngpio); @@ -448,7 +448,7 @@ static int __maybe_unused uniphier_gpio_suspend(struct device *dev) return 0; } -static int __maybe_unused uniphier_gpio_resume(struct device *dev) +static int uniphier_gpio_resume(struct device *dev) { struct uniphier_gpio_priv *priv = dev_get_drvdata(dev); unsigned int nbanks = uniphier_gpio_get_nbanks(priv->chip.ngpio); @@ -473,8 +473,7 @@ static int __maybe_unused uniphier_gpio_resume(struct device *dev) } static const struct dev_pm_ops uniphier_gpio_pm_ops = { - SET_LATE_SYSTEM_SLEEP_PM_OPS(uniphier_gpio_suspend, - uniphier_gpio_resume) + LATE_SYSTEM_SLEEP_PM_OPS(uniphier_gpio_suspend, uniphier_gpio_resume) }; static const struct of_device_id uniphier_gpio_match[] = { @@ -489,7 +488,7 @@ static struct platform_driver uniphier_gpio_driver = { .driver = { .name = "uniphier-gpio", .of_match_table = uniphier_gpio_match, - .pm = &uniphier_gpio_pm_ops, + .pm = pm_sleep_ptr(&uniphier_gpio_pm_ops), }, }; module_platform_driver(uniphier_gpio_driver); -- 2.51.0