aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/pxamci.c
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-07-29 04:59:24 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 07:15:37 -0400
commit33264f974526ea8eaaafaa5b87f89abe5a72d472 (patch)
treea73a3f4b4bd6948f605b7f67753847b525be9c1f /drivers/mmc/host/pxamci.c
parent2ba9fd0d15c088aae31ec0d672153610212e9e34 (diff)
[ARM] pxa: update pxamci.c to use 'struct dev_pm_ops'
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'drivers/mmc/host/pxamci.c')
-rw-r--r--drivers/mmc/host/pxamci.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 972efa8d2c8e..5e0b1529964d 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -804,20 +804,20 @@ static int pxamci_remove(struct platform_device *pdev)
804} 804}
805 805
806#ifdef CONFIG_PM 806#ifdef CONFIG_PM
807static int pxamci_suspend(struct platform_device *dev, pm_message_t state) 807static int pxamci_suspend(struct device *dev)
808{ 808{
809 struct mmc_host *mmc = platform_get_drvdata(dev); 809 struct mmc_host *mmc = dev_get_drvdata(dev);
810 int ret = 0; 810 int ret = 0;
811 811
812 if (mmc) 812 if (mmc)
813 ret = mmc_suspend_host(mmc, state); 813 ret = mmc_suspend_host(mmc, PMSG_SUSPEND);
814 814
815 return ret; 815 return ret;
816} 816}
817 817
818static int pxamci_resume(struct platform_device *dev) 818static int pxamci_resume(struct device *dev)
819{ 819{
820 struct mmc_host *mmc = platform_get_drvdata(dev); 820 struct mmc_host *mmc = dev_get_drvdata(dev);
821 int ret = 0; 821 int ret = 0;
822 822
823 if (mmc) 823 if (mmc)
@@ -825,19 +825,22 @@ static int pxamci_resume(struct platform_device *dev)
825 825
826 return ret; 826 return ret;
827} 827}
828#else 828
829#define pxamci_suspend NULL 829static struct dev_pm_ops pxamci_pm_ops = {
830#define pxamci_resume NULL 830 .suspend = pxamci_suspend,
831 .resume = pxamci_resume,
832};
831#endif 833#endif
832 834
833static struct platform_driver pxamci_driver = { 835static struct platform_driver pxamci_driver = {
834 .probe = pxamci_probe, 836 .probe = pxamci_probe,
835 .remove = pxamci_remove, 837 .remove = pxamci_remove,
836 .suspend = pxamci_suspend,
837 .resume = pxamci_resume,
838 .driver = { 838 .driver = {
839 .name = DRIVER_NAME, 839 .name = DRIVER_NAME,
840 .owner = THIS_MODULE, 840 .owner = THIS_MODULE,
841#ifdef CONFIG_PM
842 .pm = &pxamci_pm_ops,
843#endif
841 }, 844 },
842}; 845};
843 846