Several AHCI drivers expose suspend/resume functions in a way that can be simplified. Using pre-processor operation can lead to errors, while relying on automatic kernel configuration is safer. It also shrinks the kernel size when CONFIG_PM_SLEEP is not used[1]. This has been compile-tested on x86, arm and arm64. [1] https://lore.kernel.org/lkml/261f9fac-82de-4f39-bf5c-cdfcee917588@xxxxxxxxx/ Signed-off-by: Raphael Gallais-Pou <rgallaispou@xxxxxxxxx> --- Raphael Gallais-Pou (14): ahci: brcm: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: ceva: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: da850: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: dm816: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: imx: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: mtk: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: platform: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: qoriq: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: seattle: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: sunxi: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: pata_arasan_cf: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: pata_imx: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: sata_highbank: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: sata_rcar: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() drivers/ata/ahci_brcm.c | 6 +++--- drivers/ata/ahci_ceva.c | 8 ++++---- drivers/ata/ahci_da850.c | 7 ++++--- drivers/ata/ahci_dm816.c | 8 ++++---- drivers/ata/ahci_imx.c | 6 ++---- drivers/ata/ahci_mtk.c | 7 ++++--- drivers/ata/ahci_platform.c | 7 ++++--- drivers/ata/ahci_qoriq.c | 9 ++++----- drivers/ata/ahci_seattle.c | 7 ++++--- drivers/ata/ahci_sunxi.c | 9 ++++----- drivers/ata/pata_arasan_cf.c | 6 ++---- drivers/ata/pata_imx.c | 6 ++---- drivers/ata/sata_highbank.c | 9 ++++----- drivers/ata/sata_rcar.c | 6 +----- 14 files changed, 46 insertions(+), 55 deletions(-) --- base-commit: 5ffa57f6eecefababb8cbe327222ef171943b183 change-id: 20250113-pm_ata-dbc07b3b0df3 Best regards, -- Raphael Gallais-Pou <rgallaispou@xxxxxxxxx>