ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
authorHans de Goede <hdegoede@redhat.com>
Wed, 5 Mar 2014 19:17:49 +0000 (20:17 +0100)
committerTejun Heo <tj@kernel.org>
Thu, 6 Mar 2014 19:31:13 +0000 (14:31 -0500)
This fixes the following warnings when CONFIG_PM_SLEEP is not set:

drivers/ata/ahci_imx.c:284:12: warning: ‘imx_ahci_suspend’ defined but not used [-Wunused-function]
drivers/ata/ahci_imx.c:299:12: warning: ‘imx_ahci_resume’ defined but not used [-Wunused-function]

Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci_imx.c

index 3cb5d69581f1f0ee54e0c53a72cc18f80ff5d279..497c7abe1c7df5ef79ccd246828b68a1251c5201 100644 (file)
@@ -281,6 +281,7 @@ static void ahci_imx_host_stop(struct ata_host *host)
        imx_sata_disable(hpriv);
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int imx_ahci_suspend(struct device *dev)
 {
        struct ata_host *host = dev_get_drvdata(dev);
@@ -308,6 +309,7 @@ static int imx_ahci_resume(struct device *dev)
 
        return ahci_platform_resume_host(dev);
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(ahci_imx_pm_ops, imx_ahci_suspend, imx_ahci_resume);