diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide.c | 6 | ||||
-rw-r--r-- | drivers/ide/ppc/pmac.c | 14 |
2 files changed, 12 insertions, 8 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index defd4b4bd374..9c8468de1a75 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1207,7 +1207,7 @@ int system_bus_clock (void) | |||
1207 | 1207 | ||
1208 | EXPORT_SYMBOL(system_bus_clock); | 1208 | EXPORT_SYMBOL(system_bus_clock); |
1209 | 1209 | ||
1210 | static int generic_ide_suspend(struct device *dev, pm_message_t state) | 1210 | static int generic_ide_suspend(struct device *dev, pm_message_t mesg) |
1211 | { | 1211 | { |
1212 | ide_drive_t *drive = dev->driver_data; | 1212 | ide_drive_t *drive = dev->driver_data; |
1213 | struct request rq; | 1213 | struct request rq; |
@@ -1221,7 +1221,9 @@ static int generic_ide_suspend(struct device *dev, pm_message_t state) | |||
1221 | rq.special = &args; | 1221 | rq.special = &args; |
1222 | rq.end_io_data = &rqpm; | 1222 | rq.end_io_data = &rqpm; |
1223 | rqpm.pm_step = ide_pm_state_start_suspend; | 1223 | rqpm.pm_step = ide_pm_state_start_suspend; |
1224 | rqpm.pm_state = state.event; | 1224 | if (mesg.event == PM_EVENT_PRETHAW) |
1225 | mesg.event = PM_EVENT_FREEZE; | ||
1226 | rqpm.pm_state = mesg.event; | ||
1225 | 1227 | ||
1226 | return ide_do_drive_cmd(drive, &rq, ide_wait); | 1228 | return ide_do_drive_cmd(drive, &rq, ide_wait); |
1227 | } | 1229 | } |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 996c694341bc..31ad79f52df7 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1369,15 +1369,16 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1369 | } | 1369 | } |
1370 | 1370 | ||
1371 | static int | 1371 | static int |
1372 | pmac_ide_macio_suspend(struct macio_dev *mdev, pm_message_t state) | 1372 | pmac_ide_macio_suspend(struct macio_dev *mdev, pm_message_t mesg) |
1373 | { | 1373 | { |
1374 | ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev); | 1374 | ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev); |
1375 | int rc = 0; | 1375 | int rc = 0; |
1376 | 1376 | ||
1377 | if (state.event != mdev->ofdev.dev.power.power_state.event && state.event >= PM_EVENT_SUSPEND) { | 1377 | if (mesg.event != mdev->ofdev.dev.power.power_state.event |
1378 | && mesg.event == PM_EVENT_SUSPEND) { | ||
1378 | rc = pmac_ide_do_suspend(hwif); | 1379 | rc = pmac_ide_do_suspend(hwif); |
1379 | if (rc == 0) | 1380 | if (rc == 0) |
1380 | mdev->ofdev.dev.power.power_state = state; | 1381 | mdev->ofdev.dev.power.power_state = mesg; |
1381 | } | 1382 | } |
1382 | 1383 | ||
1383 | return rc; | 1384 | return rc; |
@@ -1473,15 +1474,16 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1473 | } | 1474 | } |
1474 | 1475 | ||
1475 | static int | 1476 | static int |
1476 | pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t state) | 1477 | pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) |
1477 | { | 1478 | { |
1478 | ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev); | 1479 | ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev); |
1479 | int rc = 0; | 1480 | int rc = 0; |
1480 | 1481 | ||
1481 | if (state.event != pdev->dev.power.power_state.event && state.event >= 2) { | 1482 | if (mesg.event != pdev->dev.power.power_state.event |
1483 | && mesg.event == PM_EVENT_SUSPEND) { | ||
1482 | rc = pmac_ide_do_suspend(hwif); | 1484 | rc = pmac_ide_do_suspend(hwif); |
1483 | if (rc == 0) | 1485 | if (rc == 0) |
1484 | pdev->dev.power.power_state = state; | 1486 | pdev->dev.power.power_state = mesg; |
1485 | } | 1487 | } |
1486 | 1488 | ||
1487 | return rc; | 1489 | return rc; |