mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
bd46a0b229
commit
f091e60fc9
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user