From: Jon Hunter <jonathanh@nvidia.com>
To: Kartik Rajput <kkartik@nvidia.com>,
alexandre.belloni@bootlin.com, thierry.reding@gmail.com,
andriy.shevchenko@linux.intel.com, linux-rtc@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/3] rtc: tegra: Replace deprecated SIMPLE_DEV_PM_OPS
Date: Fri, 24 Oct 2025 11:48:29 +0100 [thread overview]
Message-ID: <0610cc18-3918-45f3-a610-584635565258@nvidia.com> (raw)
In-Reply-To: <20251024064952.775883-3-kkartik@nvidia.com>
On 24/10/2025 07:49, Kartik Rajput wrote:
> Replace deprecated SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS macro
> and use pm_sleep_ptr() to initialize pm_ops. This also allows us to drop
> the checks for CONFIG_PM_SLEEP.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> Changes in v4:
> * Updated commit subject.
> ---
> drivers/rtc/rtc-tegra.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
> index 9e4e9c88178f..528e32b7d101 100644
> --- a/drivers/rtc/rtc-tegra.c
> +++ b/drivers/rtc/rtc-tegra.c
> @@ -340,7 +340,6 @@ static int tegra_rtc_probe(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM_SLEEP
> static int tegra_rtc_suspend(struct device *dev)
> {
> struct tegra_rtc_info *info = dev_get_drvdata(dev);
> @@ -378,9 +377,8 @@ static int tegra_rtc_resume(struct device *dev)
>
> return 0;
> }
> -#endif
>
> -static SIMPLE_DEV_PM_OPS(tegra_rtc_pm_ops, tegra_rtc_suspend, tegra_rtc_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(tegra_rtc_pm_ops, tegra_rtc_suspend, tegra_rtc_resume);
>
> static void tegra_rtc_shutdown(struct platform_device *pdev)
> {
> @@ -395,7 +393,7 @@ static struct platform_driver tegra_rtc_driver = {
> .name = "tegra_rtc",
> .of_match_table = tegra_rtc_dt_match,
> .acpi_match_table = tegra_rtc_acpi_match,
> - .pm = &tegra_rtc_pm_ops,
> + .pm = pm_sleep_ptr(&tegra_rtc_pm_ops),
> },
> };
> module_platform_driver(tegra_rtc_driver);
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Thanks!
Jon
--
nvpublic
next prev parent reply other threads:[~2025-10-24 10:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 6:49 [PATCH v4 1/3] rtc: tegra: Use devm_clk_get_enabled() in probe Kartik Rajput
2025-10-24 6:49 ` [PATCH v4 2/3] rtc: tegra: Add ACPI support Kartik Rajput
2025-10-24 10:48 ` Jon Hunter
2025-10-24 6:49 ` [PATCH v4 3/3] rtc: tegra: Replace deprecated SIMPLE_DEV_PM_OPS Kartik Rajput
2025-10-24 10:48 ` Jon Hunter [this message]
2025-10-24 10:48 ` [PATCH v4 1/3] rtc: tegra: Use devm_clk_get_enabled() in probe Jon Hunter
2025-12-08 22:09 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0610cc18-3918-45f3-a610-584635565258@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=kkartik@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®