diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 04:56:16 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-05-26 14:23:21 -0400 |
commit | 5a942b6fee81c6876044099b7622a817e4a74c03 (patch) | |
tree | 552d955c851345022ba766357e0dd40e9e31039c | |
parent | 87ae7bbebd9c9b32ad49dde1742aa68b5a86caf8 (diff) |
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>
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 10 |
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) | |||
2504 | return 0; | 2504 | return 0; |
2505 | } | 2505 | } |
2506 | 2506 | ||
2507 | #ifdef CONFIG_PM | 2507 | #ifdef CONFIG_PM_SLEEP |
2508 | static int atmci_suspend(struct device *dev) | 2508 | static int atmci_suspend(struct device *dev) |
2509 | { | 2509 | { |
2510 | struct atmel_mci *host = dev_get_drvdata(dev); | 2510 | struct atmel_mci *host = dev_get_drvdata(dev); |
@@ -2559,17 +2559,15 @@ static int atmci_resume(struct device *dev) | |||
2559 | 2559 | ||
2560 | return ret; | 2560 | return ret; |
2561 | } | 2561 | } |
2562 | static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume); | ||
2563 | #define ATMCI_PM_OPS (&atmci_pm) | ||
2564 | #else | ||
2565 | #define ATMCI_PM_OPS NULL | ||
2566 | #endif | 2562 | #endif |
2567 | 2563 | ||
2564 | static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume); | ||
2565 | |||
2568 | static struct platform_driver atmci_driver = { | 2566 | static struct platform_driver atmci_driver = { |
2569 | .remove = __exit_p(atmci_remove), | 2567 | .remove = __exit_p(atmci_remove), |
2570 | .driver = { | 2568 | .driver = { |
2571 | .name = "atmel_mci", | 2569 | .name = "atmel_mci", |
2572 | .pm = ATMCI_PM_OPS, | 2570 | .pm = &atmci_pm, |
2573 | .of_match_table = of_match_ptr(atmci_dt_ids), | 2571 | .of_match_table = of_match_ptr(atmci_dt_ids), |
2574 | }, | 2572 | }, |
2575 | }; | 2573 | }; |