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

Raphael Gallais-Pou
2025-01-27T12:54:56Z

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

diff --git a/drivers/ata/ahci_mtk.c b/drivers/ata/ahci_mtk.c
index 7295b9066ae213a72a8c180a66ecfac8c2f46ff9..4afcf5e90e3b660f17b2eb0b1e3df446bef470da 100644
--- a/drivers/ata/ahci_mtk.c
+++ b/drivers/ata/ahci_mtk.c
@@ -163,8 +163,9 @@ static int mtk_ahci_probe(struct platform_device *pdev)
return err;
}

-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 of_device_id ahci_of_match[] = {
{ .compatible = "mediatek,mtk-ahci", },
@@ -178,7 +179,7 @@ static struct platform_driver mtk_ahci_driver = {
.driver = {
.name = DRV_NAME,
.of_match_table = ahci_of_match,
- .pm = &ahci_pm_ops,
+ .pm = pm_sleep_ptr(&ahci_pm_ops),
},
};
module_platform_driver(mtk_ahci_driver);

--
2.48.0