lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0610cc18-3918-45f3-a610-584635565258@nvidia.com>
Date: Fri, 24 Oct 2025 11:48:29 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Kartik Rajput <kkartik@...dia.com>, alexandre.belloni@...tlin.com,
 thierry.reding@...il.com, andriy.shevchenko@...ux.intel.com,
 linux-rtc@...r.kernel.org, linux-tegra@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 3/3] rtc: tegra: Replace deprecated SIMPLE_DEV_PM_OPS



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@...ux.intel.com>
> Signed-off-by: Kartik Rajput <kkartik@...dia.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.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@...dia.com>

Thanks!
Jon

-- 
nvpublic


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ