Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284500
b: refs/heads/master
c: 6fe8890
h: refs/heads/master
v: v3
  • Loading branch information
Jaehoon Chung authored and Chris Ball committed Jan 12, 2012
1 parent 34ce9b2 commit 079ba8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: a8ad82cc1b22d04916d9cdb1dc75052e80ac803c
refs/heads/master: 6fe8890d0200ea0c2b7d83936d58f97d7ba7c1ff
19 changes: 10 additions & 9 deletions trunk/drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2062,14 +2062,14 @@ static int __exit dw_mci_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
/*
* TODO: we should probably disable the clock to the card in the suspend path.
*/
static int dw_mci_suspend(struct platform_device *pdev, pm_message_t mesg)
static int dw_mci_suspend(struct device *dev)
{
int i, ret;
struct dw_mci *host = platform_get_drvdata(pdev);
struct dw_mci *host = dev_get_drvdata(dev);

for (i = 0; i < host->num_slots; i++) {
struct dw_mci_slot *slot = host->slot[i];
Expand All @@ -2092,18 +2092,18 @@ static int dw_mci_suspend(struct platform_device *pdev, pm_message_t mesg)
return 0;
}

static int dw_mci_resume(struct platform_device *pdev)
static int dw_mci_resume(struct device *dev)
{
int i, ret;
struct dw_mci *host = platform_get_drvdata(pdev);
struct dw_mci *host = dev_get_drvdata(dev);

if (host->vmmc)
regulator_enable(host->vmmc);

if (host->dma_ops->init)
host->dma_ops->init(host);

if (!mci_wait_reset(&pdev->dev, host)) {
if (!mci_wait_reset(dev, host)) {
ret = -ENODEV;
return ret;
}
Expand Down Expand Up @@ -2131,14 +2131,15 @@ static int dw_mci_resume(struct platform_device *pdev)
#else
#define dw_mci_suspend NULL
#define dw_mci_resume NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static SIMPLE_DEV_PM_OPS(dw_mci_pmops, dw_mci_suspend, dw_mci_resume);

static struct platform_driver dw_mci_driver = {
.remove = __exit_p(dw_mci_remove),
.suspend = dw_mci_suspend,
.resume = dw_mci_resume,
.driver = {
.name = "dw_mmc",
.pm = &dw_mci_pmops,
},
};

Expand Down

0 comments on commit 079ba8e

Please sign in to comment.