From: Jingoo Han <jg1.han@samsung.com>
To: 'Chris Ball' <cjb@laptop.org>
Cc: linux-mmc@vger.kernel.org,
'Ludovic Desroches' <ludovic.desroches@atmel.com>,
'Jingoo Han' <jg1.han@samsung.com>
Subject: [PATCH 1/2] mmc: atmel-mci: add CONFIG_PM_SLEEP to suspend/resume functions
Date: Fri, 29 Mar 2013 16:05:40 +0900 [thread overview]
Message-ID: <003301ce2c4b$d2864fb0$7792ef10$%han@samsung.com> (raw)
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:2526:12: warning: 'atmci_suspend' defined but not used [-Wunused-function]
drivers/mmc/host/atmel-mci.c:2556:12: warning: 'atmci_resume' defined but not used [-Wunused-function]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
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 10f8b73..172f874 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -2499,7 +2499,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);
@@ -2554,17 +2554,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),
},
};
--
1.7.2.5
next reply other threads:[~2013-03-29 7:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 7:05 Jingoo Han [this message]
2013-03-29 7:08 ` [PATCH 2/2] mmc: sdhci-spear: add CONFIG_PM_SLEEP to suspend/resume functions Jingoo Han
2013-03-29 7:18 ` Viresh Kumar
2013-04-04 14:14 ` Chris Ball
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003301ce2c4b$d2864fb0$7792ef10$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox