aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide.c9
-rw-r--r--drivers/scsi/ide-scsi.c2
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 0af0d1614f75..0cd76bf66833 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1010,7 +1010,6 @@ 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);
1014 struct request rq; 1013 struct request rq;
1015 struct request_pm_state rqpm; 1014 struct request_pm_state rqpm;
1016 ide_task_t args; 1015 ide_task_t args;
@@ -1033,8 +1032,12 @@ static int generic_ide_resume(struct device *dev)
1033 1032
1034 err = ide_do_drive_cmd(drive, &rq, ide_head_wait); 1033 err = ide_do_drive_cmd(drive, &rq, ide_head_wait);
1035 1034
1036 if (err == 0 && drv && drv->resume) 1035 if (err == 0 && dev->driver) {
1037 drv->resume(drive); 1036 ide_driver_t *drv = to_ide_driver(dev->driver);
1037
1038 if (drv->resume)
1039 drv->resume(drive);
1040 }
1038 1041
1039 return err; 1042 return err;
1040} 1043}
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 8263f752809d..bb90df8bdce4 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -463,7 +463,7 @@ static inline unsigned long get_timeout(idescsi_pc_t *pc)
463 463
464static int idescsi_expiry(ide_drive_t *drive) 464static int idescsi_expiry(ide_drive_t *drive)
465{ 465{
466 idescsi_scsi_t *scsi = drive->driver_data; 466 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
467 idescsi_pc_t *pc = scsi->pc; 467 idescsi_pc_t *pc = scsi->pc;
468 468
469#if IDESCSI_DEBUG_LOG 469#if IDESCSI_DEBUG_LOG