Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201666
b: refs/heads/master
c: a7d403c
h: refs/heads/master
v: v3
  • Loading branch information
Eric Bénard authored and Sascha Hauer committed Jul 26, 2010
1 parent d8295df commit 4aa07a8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5efe2551e3ea88d9446f0d9d073debbb847f6af
refs/heads/master: a7d403cfd1a4c8924874e0f6b600edb7f38684d0
32 changes: 18 additions & 14 deletions trunk/drivers/mmc/host/mxcmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,43 +936,47 @@ static int mxcmci_remove(struct platform_device *pdev)
}

#ifdef CONFIG_PM
static int mxcmci_suspend(struct platform_device *dev, pm_message_t state)
static int mxcmci_suspend(struct device *dev)
{
struct mmc_host *mmc = platform_get_drvdata(dev);
struct mmc_host *mmc = dev_get_drvdata(dev);
struct mxcmci_host *host = mmc_priv(mmc);
int ret = 0;

if (mmc)
ret = mmc_suspend_host(mmc);
clk_disable(host->clk);

return ret;
}

static int mxcmci_resume(struct platform_device *dev)
static int mxcmci_resume(struct device *dev)
{
struct mmc_host *mmc = platform_get_drvdata(dev);
struct mxcmci_host *host;
struct mmc_host *mmc = dev_get_drvdata(dev);
struct mxcmci_host *host = mmc_priv(mmc);
int ret = 0;

if (mmc) {
host = mmc_priv(mmc);
clk_enable(host->clk);
if (mmc)
ret = mmc_resume_host(mmc);
}

return ret;
}
#else
#define mxcmci_suspend NULL
#define mxcmci_resume NULL
#endif /* CONFIG_PM */

static const struct dev_pm_ops mxcmci_pm_ops = {
.suspend = mxcmci_suspend,
.resume = mxcmci_resume,
};
#endif

static struct platform_driver mxcmci_driver = {
.probe = mxcmci_probe,
.remove = mxcmci_remove,
.suspend = mxcmci_suspend,
.resume = mxcmci_resume,
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &mxcmci_pm_ops,
#endif
}
};

Expand Down

0 comments on commit 4aa07a8

Please sign in to comment.