aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 6002713a20a1..0af0d1614f75 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1010,9 +1010,11 @@ static int generic_ide_resume(struct device *dev)
1010{ 1010{
1011 ide_drive_t *drive = dev->driver_data; 1011 ide_drive_t *drive = dev->driver_data;
1012 ide_hwif_t *hwif = HWIF(drive); 1012 ide_hwif_t *hwif = HWIF(drive);
1013 ide_driver_t *drv = to_ide_driver(dev->driver);
1013 struct request rq; 1014 struct request rq;
1014 struct request_pm_state rqpm; 1015 struct request_pm_state rqpm;
1015 ide_task_t args; 1016 ide_task_t args;
1017 int err;
1016 1018
1017 /* Call ACPI _STM only once */ 1019 /* Call ACPI _STM only once */
1018 if (!(drive->dn % 2)) 1020 if (!(drive->dn % 2))
@@ -1029,7 +1031,12 @@ static int generic_ide_resume(struct device *dev)
1029 rqpm.pm_step = ide_pm_state_start_resume; 1031 rqpm.pm_step = ide_pm_state_start_resume;
1030 rqpm.pm_state = PM_EVENT_ON; 1032 rqpm.pm_state = PM_EVENT_ON;
1031 1033
1032 return ide_do_drive_cmd(drive, &rq, ide_head_wait); 1034 err = ide_do_drive_cmd(drive, &rq, ide_head_wait);
1035
1036 if (err == 0 && drv && drv->resume)
1037 drv->resume(drive);
1038
1039 return err;
1033} 1040}
1034 1041
1035int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev, 1042int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev,