|
@@ -1456,10 +1456,11 @@ static int __devexit mmci_remove(struct amba_device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_PM
|
|
|
-static int mmci_suspend(struct amba_device *dev, pm_message_t state)
|
|
|
+#ifdef CONFIG_SUSPEND
|
|
|
+static int mmci_suspend(struct device *dev)
|
|
|
{
|
|
|
- struct mmc_host *mmc = amba_get_drvdata(dev);
|
|
|
+ struct amba_device *adev = to_amba_device(dev);
|
|
|
+ struct mmc_host *mmc = amba_get_drvdata(adev);
|
|
|
int ret = 0;
|
|
|
|
|
|
if (mmc) {
|
|
@@ -1473,9 +1474,10 @@ static int mmci_suspend(struct amba_device *dev, pm_message_t state)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-static int mmci_resume(struct amba_device *dev)
|
|
|
+static int mmci_resume(struct device *dev)
|
|
|
{
|
|
|
- struct mmc_host *mmc = amba_get_drvdata(dev);
|
|
|
+ struct amba_device *adev = to_amba_device(dev);
|
|
|
+ struct mmc_host *mmc = amba_get_drvdata(adev);
|
|
|
int ret = 0;
|
|
|
|
|
|
if (mmc) {
|
|
@@ -1488,11 +1490,12 @@ static int mmci_resume(struct amba_device *dev)
|
|
|
|
|
|
return ret;
|
|
|
}
|
|
|
-#else
|
|
|
-#define mmci_suspend NULL
|
|
|
-#define mmci_resume NULL
|
|
|
#endif
|
|
|
|
|
|
+static const struct dev_pm_ops mmci_dev_pm_ops = {
|
|
|
+ SET_SYSTEM_SLEEP_PM_OPS(mmci_suspend, mmci_resume)
|
|
|
+};
|
|
|
+
|
|
|
static struct amba_id mmci_ids[] = {
|
|
|
{
|
|
|
.id = 0x00041180,
|
|
@@ -1538,11 +1541,10 @@ MODULE_DEVICE_TABLE(amba, mmci_ids);
|
|
|
static struct amba_driver mmci_driver = {
|
|
|
.drv = {
|
|
|
.name = DRIVER_NAME,
|
|
|
+ .pm = &mmci_dev_pm_ops,
|
|
|
},
|
|
|
.probe = mmci_probe,
|
|
|
.remove = __devexit_p(mmci_remove),
|
|
|
- .suspend = mmci_suspend,
|
|
|
- .resume = mmci_resume,
|
|
|
.id_table = mmci_ids,
|
|
|
};
|
|
|
|