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 <lijun01@kylinos.cn>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20260908094901.2527974-1-lijun01@kylinos.cn
Signed-off-by: Niklas Cassel <cassel@kernel.org>
This commit is contained in:
Li Jun 2026-09-08 17:49:01 +08:00 committed by Niklas Cassel
parent bd46a0b229
commit f091e60fc9

View File

@ -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);