diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide.c | 6 | ||||
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 4 | ||||
-rw-r--r-- | drivers/ide/ppc/pmac.c | 14 |
3 files changed, 14 insertions, 10 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index defd4b4..9c8468d 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1207,7 +1207,7 @@ int system_bus_clock (void) EXPORT_SYMBOL(system_bus_clock); -static int generic_ide_suspend(struct device *dev, pm_message_t state) +static int generic_ide_suspend(struct device *dev, pm_message_t mesg) { ide_drive_t *drive = dev->driver_data; struct request rq; @@ -1221,7 +1221,9 @@ static int generic_ide_suspend(struct device *dev, pm_message_t state) rq.special = &args; rq.end_io_data = &rqpm; rqpm.pm_step = ide_pm_state_start_suspend; - rqpm.pm_state = state.event; + if (mesg.event == PM_EVENT_PRETHAW) + mesg.event = PM_EVENT_FREEZE; + rqpm.pm_state = mesg.event; return ide_do_drive_cmd(drive, &rq, ide_wait); } diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 71f27e9..c7854ea 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -476,13 +476,13 @@ static int auide_dma_lostirq(ide_drive_t *drive) return 0; } -static void auide_ddma_tx_callback(int irq, void *param, struct pt_regs *regs) +static void auide_ddma_tx_callback(int irq, void *param) { _auide_hwif *ahwif = (_auide_hwif*)param; ahwif->drive->waiting_for_dma = 0; } -static void auide_ddma_rx_callback(int irq, void *param, struct pt_regs *regs) +static void auide_ddma_rx_callback(int irq, void *param) { _auide_hwif *ahwif = (_auide_hwif*)param; ahwif->drive->waiting_for_dma = 0; diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 996c694..31ad79f 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) } static int -pmac_ide_macio_suspend(struct macio_dev *mdev, pm_message_t state) +pmac_ide_macio_suspend(struct macio_dev *mdev, pm_message_t mesg) { ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev); int rc = 0; - if (state.event != mdev->ofdev.dev.power.power_state.event && state.event >= PM_EVENT_SUSPEND) { + if (mesg.event != mdev->ofdev.dev.power.power_state.event + && mesg.event == PM_EVENT_SUSPEND) { rc = pmac_ide_do_suspend(hwif); if (rc == 0) - mdev->ofdev.dev.power.power_state = state; + mdev->ofdev.dev.power.power_state = mesg; } return rc; @@ -1473,15 +1474,16 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) } static int -pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t state) +pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) { ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev); int rc = 0; - if (state.event != pdev->dev.power.power_state.event && state.event >= 2) { + if (mesg.event != pdev->dev.power.power_state.event + && mesg.event == PM_EVENT_SUSPEND) { rc = pmac_ide_do_suspend(hwif); if (rc == 0) - pdev->dev.power.power_state = state; + pdev->dev.power.power_state = mesg; } return rc; |