Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312764
b: refs/heads/master
c: 156ffcb
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 6, 2012
1 parent 5e33a25 commit 902d340
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 9033132ddff7d096f3e54704c4250384c5ab3aa2
refs/heads/master: 156ffcb42a3b3fbebbb7f0e08e679b0954c0829c
13 changes: 7 additions & 6 deletions trunk/drivers/block/mg_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,9 +780,9 @@ static const struct block_device_operations mg_disk_ops = {
.getgeo = mg_getgeo
};

static int mg_suspend(struct platform_device *plat_dev, pm_message_t state)
static int mg_suspend(struct device *dev)
{
struct mg_drv_data *prv_data = plat_dev->dev.platform_data;
struct mg_drv_data *prv_data = dev->platform_data;
struct mg_host *host = prv_data->host;

if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
Expand All @@ -804,9 +804,9 @@ static int mg_suspend(struct platform_device *plat_dev, pm_message_t state)
return 0;
}

static int mg_resume(struct platform_device *plat_dev)
static int mg_resume(struct device *dev)
{
struct mg_drv_data *prv_data = plat_dev->dev.platform_data;
struct mg_drv_data *prv_data = dev->platform_data;
struct mg_host *host = prv_data->host;

if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
Expand All @@ -825,6 +825,8 @@ static int mg_resume(struct platform_device *plat_dev)
return 0;
}

static SIMPLE_DEV_PM_OPS(mg_pm, mg_suspend, mg_resume);

static int mg_probe(struct platform_device *plat_dev)
{
struct mg_host *host;
Expand Down Expand Up @@ -1074,11 +1076,10 @@ static int mg_remove(struct platform_device *plat_dev)
static struct platform_driver mg_disk_driver = {
.probe = mg_probe,
.remove = mg_remove,
.suspend = mg_suspend,
.resume = mg_resume,
.driver = {
.name = MG_DEV_NAME,
.owner = THIS_MODULE,
.pm = &mg_pm,
}
};

Expand Down

0 comments on commit 902d340

Please sign in to comment.