1 The newly added suspend/resume implementation for ahci_mvebu causes
2 a link error when CONFIG_PM_SUSPEND is disabled:
4 ERROR: "ahci_platform_suspend_host" [drivers/ata/ahci_mvebu.ko] undefined!
5 ERROR: "ahci_platform_resume_host" [drivers/ata/ahci_mvebu.ko] undefined!
7 This adds the same #ifdef here that exists in the ahci_platform driver
8 which defines the above functions.
10 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 Fixes: d6ecf1581488 ("ata: ahci_mvebu: add suspend/resume support")
12 Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
14 --- a/drivers/ata/ahci_mvebu.c
15 +++ b/drivers/ata/ahci_mvebu.c
16 @@ -62,6 +62,7 @@ static void ahci_mvebu_regret_option(str
17 writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA);
20 +#ifdef CONFIG_PM_SLEEP
21 static int ahci_mvebu_suspend(struct platform_device *pdev, pm_message_t state)
23 return ahci_platform_suspend_host(&pdev->dev);
24 @@ -81,6 +82,10 @@ static int ahci_mvebu_resume(struct plat
26 return ahci_platform_resume_host(&pdev->dev);
29 +#define ahci_mvebu_suspend NULL
30 +#define ahci_mvebu_resume NULL
33 static const struct ata_port_info ahci_mvebu_port_info = {
34 .flags = AHCI_FLAG_COMMON,