aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/mg_disk.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 76fa3deaee84..1788f491e0fb 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -780,9 +780,9 @@ static const struct block_device_operations mg_disk_ops = {
780 .getgeo = mg_getgeo 780 .getgeo = mg_getgeo
781}; 781};
782 782
783static int mg_suspend(struct platform_device *plat_dev, pm_message_t state) 783static int mg_suspend(struct device *dev)
784{ 784{
785 struct mg_drv_data *prv_data = plat_dev->dev.platform_data; 785 struct mg_drv_data *prv_data = dev->platform_data;
786 struct mg_host *host = prv_data->host; 786 struct mg_host *host = prv_data->host;
787 787
788 if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD)) 788 if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
@@ -804,9 +804,9 @@ static int mg_suspend(struct platform_device *plat_dev, pm_message_t state)
804 return 0; 804 return 0;
805} 805}
806 806
807static int mg_resume(struct platform_device *plat_dev) 807static int mg_resume(struct device *dev)
808{ 808{
809 struct mg_drv_data *prv_data = plat_dev->dev.platform_data; 809 struct mg_drv_data *prv_data = dev->platform_data;
810 struct mg_host *host = prv_data->host; 810 struct mg_host *host = prv_data->host;
811 811
812 if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD)) 812 if (mg_wait(host, MG_STAT_READY, MG_TMAX_CONF_TO_CMD))
@@ -825,6 +825,8 @@ static int mg_resume(struct platform_device *plat_dev)
825 return 0; 825 return 0;
826} 826}
827 827
828static SIMPLE_DEV_PM_OPS(mg_pm, mg_suspend, mg_resume);
829
828static int mg_probe(struct platform_device *plat_dev) 830static int mg_probe(struct platform_device *plat_dev)
829{ 831{
830 struct mg_host *host; 832 struct mg_host *host;
@@ -1074,11 +1076,10 @@ static int mg_remove(struct platform_device *plat_dev)
1074static struct platform_driver mg_disk_driver = { 1076static struct platform_driver mg_disk_driver = {
1075 .probe = mg_probe, 1077 .probe = mg_probe,
1076 .remove = mg_remove, 1078 .remove = mg_remove,
1077 .suspend = mg_suspend,
1078 .resume = mg_resume,
1079 .driver = { 1079 .driver = {
1080 .name = MG_DEV_NAME, 1080 .name = MG_DEV_NAME,
1081 .owner = THIS_MODULE, 1081 .owner = THIS_MODULE,
1082 .pm = &mg_pm,
1082 } 1083 }
1083}; 1084};
1084 1085