summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-29 17:56:16 +0900
committerChris Ball <cjb@laptop.org>2013-05-26 14:23:21 -0400
commit5a942b6fee81c6876044099b7622a817e4a74c03 (patch)
tree552d955c851345022ba766357e0dd40e9e31039c /drivers
parent87ae7bbebd9c9b32ad49dde1742aa68b5a86caf8 (diff)
downloadlinux-5a942b6fee81c6876044099b7622a817e4a74c03.tar.gz
linux-5a942b6fee81c6876044099b7622a817e4a74c03.tar.bz2
linux-5a942b6fee81c6876044099b7622a817e4a74c03.zip
mmc: atmel-mci: add CONFIG_PM_SLEEP to suspend/resume functions
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/mmc/host/atmel-mci.c:2509:12: warning: 'atmci_suspend' defined but not used [-Wunused-function] drivers/mmc/host/atmel-mci.c:2539:12: warning: 'atmci_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/atmel-mci.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index aca59d93d5a9..7d8e87ad6d6d 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -2504,7 +2504,7 @@ static int __exit atmci_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int atmci_suspend(struct device *dev)
{
struct atmel_mci *host = dev_get_drvdata(dev);
@@ -2559,17 +2559,15 @@ static int atmci_resume(struct device *dev)
return ret;
}
-static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume);
-#define ATMCI_PM_OPS (&atmci_pm)
-#else
-#define ATMCI_PM_OPS NULL
#endif
+static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume);
+
static struct platform_driver atmci_driver = {
.remove = __exit_p(atmci_remove),
.driver = {
.name = "atmel_mci",
- .pm = ATMCI_PM_OPS,
+ .pm = &atmci_pm,
.of_match_table = of_match_ptr(atmci_dt_ids),
},
};