Skip to content

Commit bf5ef3c

Browse files
Kartik Rajputalexandrebelloni
authored andcommitted
rtc: tegra: Replace 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@linux.intel.com> Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Link: https://patch.msgid.link/20251024064952.775883-3-kkartik@nvidia.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 0a29345 commit bf5ef3c

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/rtc/rtc-tegra.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ static int tegra_rtc_probe(struct platform_device *pdev)
340340
return 0;
341341
}
342342

343-
#ifdef CONFIG_PM_SLEEP
344343
static int tegra_rtc_suspend(struct device *dev)
345344
{
346345
struct tegra_rtc_info *info = dev_get_drvdata(dev);
@@ -378,9 +377,8 @@ static int tegra_rtc_resume(struct device *dev)
378377

379378
return 0;
380379
}
381-
#endif
382380

383-
static SIMPLE_DEV_PM_OPS(tegra_rtc_pm_ops, tegra_rtc_suspend, tegra_rtc_resume);
381+
static DEFINE_SIMPLE_DEV_PM_OPS(tegra_rtc_pm_ops, tegra_rtc_suspend, tegra_rtc_resume);
384382

385383
static void tegra_rtc_shutdown(struct platform_device *pdev)
386384
{
@@ -395,7 +393,7 @@ static struct platform_driver tegra_rtc_driver = {
395393
.name = "tegra_rtc",
396394
.of_match_table = tegra_rtc_dt_match,
397395
.acpi_match_table = tegra_rtc_acpi_match,
398-
.pm = &tegra_rtc_pm_ops,
396+
.pm = pm_sleep_ptr(&tegra_rtc_pm_ops),
399397
},
400398
};
401399
module_platform_driver(tegra_rtc_driver);

0 commit comments

Comments
 (0)