[PATCH RFC 09/14] ahci: seattle: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()

Raphael Gallais-Pou
2025-01-27T12:59:02Z

drivers/ata/ahci_seattle.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c
index 3f16c167840222e0de935f7fe44b3d83b95bc16c..4b67f3aa5787de433c8bcc1bb4965a887709aa9c 100644
--- a/drivers/ata/ahci_seattle.c
+++ b/drivers/ata/ahci_seattle.c
@@ -174,8 +174,9 @@ static int ahci_seattle_probe(struct platform_device *pdev)
return rc;
}

-static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend,
- ahci_platform_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(ahci_pm_ops,
+ ahci_platform_suspend,
+ ahci_platform_resume);

static const struct acpi_device_id ahci_acpi_match[] = {
{ "AMDI0600", 0 },
@@ -189,7 +190,7 @@ static struct platform_driver ahci_seattle_driver = {
.driver = {
.name = DRV_NAME,
.acpi_match_table = ahci_acpi_match,
- .pm = &ahci_pm_ops,
+ .pm = pm_sleep_ptr(&ahci_pm_ops),
},
};
module_platform_driver(ahci_seattle_driver);

--
2.48.0