linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
@ 2014-03-05 19:17 Hans de Goede
  2014-03-05 19:23 ` Marek Vasut
  2014-03-06 19:31 ` Tejun Heo
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2014-03-05 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/ata/ahci_imx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 3cb5d69..497c7ab 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -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);
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-06 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 19:17 [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions Hans de Goede
2014-03-05 19:23 ` Marek Vasut
2014-03-05 19:27   ` Alexander Shiyan
2014-03-06 19:31 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).