[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251023093042.770798-3-kkartik@nvidia.com>
Date: Thu, 23 Oct 2025 15:00:42 +0530
From: Kartik Rajput <kkartik@...dia.com>
To: <alexandre.belloni@...tlin.com>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <andriy.shevchenko@...ux.intel.com>,
<linux-rtc@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Kartik Rajput <kkartik@...dia.com>
Subject: [PATCH v3 3/3] rtc: tegra: Drop deprecated SIMPLE_DEV_PM_OPS
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@...ux.intel.com>
Signed-off-by: Kartik Rajput <kkartik@...dia.com>
---
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 ad0c57ce87df..3ee8e1c97a5a 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -347,7 +347,6 @@ static void tegra_rtc_remove(struct platform_device *pdev)
clk_disable_unprepare(info->clk);
}
-#ifdef CONFIG_PM_SLEEP
static int tegra_rtc_suspend(struct device *dev)
{
struct tegra_rtc_info *info = dev_get_drvdata(dev);
@@ -385,9 +384,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)
{
@@ -403,7 +401,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);
--
2.43.0
Powered by blists - more mailing lists