From: akpm@linux-foundation.org
To: torvalds@linux-foundation.org
Cc: akpm@linux-foundation.org, khilman@deeprootsystems.com,
adrian.hunter@nokia.com, ext-denis.2.karpov@nokia.com,
linux-mmc@vger.kernel.org, madhu.cr@ti.com,
matt@console-pimps.org, tony@atomide.com
Subject: [patch 018/203] mmc: OMAP HS-MMC: convert to dev_pm_ops
Date: Wed, 26 May 2010 14:42:07 -0700 [thread overview]
Message-ID: <201005262142.o4QLg736015375@imap1.linux-foundation.org> (raw)
From: Kevin Hilman <khilman@deeprootsystems.com>
Convert PM operations to use dev_pm_ops. This will facilitate the runtime
PM coversion which will add to dev_pm_ops hooks.
Note that dev_pm_ops version of the suspend hook no longer takes a 'state'
argument. However, the MMC core function mmc_suspend_host() still takes a
'state' argument, but it is unused, so a dummy state variable was created
to pass to the MMC core.
In the future, the MMC core should be converted to drop this state
argument and the rest of the MMC drivers could be easily converted to
dev_pm_ops as well.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Denis Karpov <ext-denis.2.karpov@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mmc/host/omap_hsmmc.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff -puN drivers/mmc/host/omap_hsmmc.c~mmc-omap-hs-mmc-convert-to-dev_pm_ops drivers/mmc/host/omap_hsmmc.c
--- a/drivers/mmc/host/omap_hsmmc.c~mmc-omap-hs-mmc-convert-to-dev_pm_ops
+++ a/drivers/mmc/host/omap_hsmmc.c
@@ -2267,10 +2267,12 @@ static int omap_hsmmc_remove(struct plat
}
#ifdef CONFIG_PM
-static int omap_hsmmc_suspend(struct platform_device *pdev, pm_message_t state)
+static int omap_hsmmc_suspend(struct device *dev)
{
int ret = 0;
+ struct platform_device *pdev = to_platform_device(dev);
struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
+ pm_message_t state = PMSG_SUSPEND; /* unused by MMC core */
if (host && host->suspended)
return 0;
@@ -2316,9 +2318,10 @@ static int omap_hsmmc_suspend(struct pla
}
/* Routine to resume the MMC device */
-static int omap_hsmmc_resume(struct platform_device *pdev)
+static int omap_hsmmc_resume(struct device *dev)
{
int ret = 0;
+ struct platform_device *pdev = to_platform_device(dev);
struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
if (host && !host->suspended)
@@ -2369,13 +2372,17 @@ clk_en_err:
#define omap_hsmmc_resume NULL
#endif
-static struct platform_driver omap_hsmmc_driver = {
- .remove = omap_hsmmc_remove,
+static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
.suspend = omap_hsmmc_suspend,
.resume = omap_hsmmc_resume,
+};
+
+static struct platform_driver omap_hsmmc_driver = {
+ .remove = omap_hsmmc_remove,
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
+ .pm = &omap_hsmmc_dev_pm_ops,
},
};
_
reply other threads:[~2010-05-26 22:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201005262142.o4QLg736015375@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adrian.hunter@nokia.com \
--cc=ext-denis.2.karpov@nokia.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-mmc@vger.kernel.org \
--cc=madhu.cr@ti.com \
--cc=matt@console-pimps.org \
--cc=tony@atomide.com \
--cc=torvalds@linux-foundation.org \
/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