Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46ce6b74 authored by Hans de Goede's avatar Hans de Goede Committed by Tejun Heo
Browse files

ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions



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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent d2ec147a
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -281,6 +281,7 @@ static void ahci_imx_host_stop(struct ata_host *host)
	imx_sata_disable(hpriv);
	imx_sata_disable(hpriv);
}
}


#ifdef CONFIG_PM_SLEEP
static int imx_ahci_suspend(struct device *dev)
static int imx_ahci_suspend(struct device *dev)
{
{
	struct ata_host *host = dev_get_drvdata(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);
	return ahci_platform_resume_host(dev);
}
}
#endif


static SIMPLE_DEV_PM_OPS(ahci_imx_pm_ops, imx_ahci_suspend, imx_ahci_resume);
static SIMPLE_DEV_PM_OPS(ahci_imx_pm_ops, imx_ahci_suspend, imx_ahci_resume);