From f091e60fc986eb12ff632f682848b88da824bccb Mon Sep 17 00:00:00 2001 From: Li Jun Date: Tue, 8 Sep 2026 17:49:01 +0800 Subject: [PATCH] ata: ahci_da850: switch to DEFINE_SIMPLE_DEV_PM_OPS Replace the deprecated SIMPLE_DEV_PM_OPS macro with the recommended DEFINE_SIMPLE_DEV_PM_OPS. Use pm_ptr(&ahci_da850_pm_ops) to complete the API migration and allow the structure to be correctly dropped when CONFIG_PM_SLEEP=n. Signed-off-by: Li Jun Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20260908094901.2527974-1-lijun01@kylinos.cn Signed-off-by: Niklas Cassel --- drivers/ata/ahci_da850.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index 4e53ff96d712..59b9ca26fd44 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -218,8 +218,8 @@ static int ahci_da850_probe(struct platform_device *pdev) return rc; } -static SIMPLE_DEV_PM_OPS(ahci_da850_pm_ops, ahci_platform_suspend, - ahci_platform_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ahci_da850_pm_ops, ahci_platform_suspend, + ahci_platform_resume); static const struct of_device_id ahci_da850_of_match[] = { { .compatible = "ti,da850-ahci", }, @@ -233,7 +233,7 @@ static struct platform_driver ahci_da850_driver = { .driver = { .name = DRV_NAME, .of_match_table = ahci_da850_of_match, - .pm = &ahci_da850_pm_ops, + .pm = pm_sleep_ptr(&ahci_da850_pm_ops), }, }; module_platform_driver(ahci_da850_driver);