Commit a792ae8e authored by Linus Torvalds's avatar Linus Torvalds

ppc: fix up pmac IDE driver for driver core changes

device power state is in "dev.power.power_state" now, rather than
in "dev.power_state".
parent 98adb34c
......@@ -1360,10 +1360,10 @@ pmac_ide_macio_suspend(struct macio_dev *mdev, u32 state)
ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev);
int rc = 0;
if (state != mdev->ofdev.dev.power_state && state >= 2) {
if (state != mdev->ofdev.dev.power.power_state && state >= 2) {
rc = pmac_ide_do_suspend(hwif);
if (rc == 0)
mdev->ofdev.dev.power_state = state;
mdev->ofdev.dev.power.power_state = state;
}
return rc;
......@@ -1375,10 +1375,10 @@ pmac_ide_macio_resume(struct macio_dev *mdev)
ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev);
int rc = 0;
if (mdev->ofdev.dev.power_state != 0) {
if (mdev->ofdev.dev.power.power_state != 0) {
rc = pmac_ide_do_resume(hwif);
if (rc == 0)
mdev->ofdev.dev.power_state = 0;
mdev->ofdev.dev.power.power_state = 0;
}
return rc;
......@@ -1468,10 +1468,10 @@ pmac_ide_pci_suspend(struct pci_dev *pdev, u32 state)
ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev);
int rc = 0;
if (state != pdev->dev.power_state && state >= 2) {
if (state != pdev->dev.power.power_state && state >= 2) {
rc = pmac_ide_do_suspend(hwif);
if (rc == 0)
pdev->dev.power_state = state;
pdev->dev.power.power_state = state;
}
return rc;
......@@ -1483,10 +1483,10 @@ pmac_ide_pci_resume(struct pci_dev *pdev)
ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev);
int rc = 0;
if (pdev->dev.power_state != 0) {
if (pdev->dev.power.power_state != 0) {
rc = pmac_ide_do_resume(hwif);
if (rc == 0)
pdev->dev.power_state = 0;
pdev->dev.power.power_state = 0;
}
return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment