summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 17:34:34 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 17:34:34 -0700
commitde7f928ca460005086a8296be07c217aac4b625d (patch)
treedb7ae7a5a536d2cd6b686b69759092eb237e252f /drivers
parentfa04a008a16ac633a55f41baf9e84b551e613e7e (diff)
parentd1be0a8225f2cb1cdc356ebb0ae6800f023ce67d (diff)
downloadblackbird-op-linux-de7f928ca460005086a8296be07c217aac4b625d.tar.gz
blackbird-op-linux-de7f928ca460005086a8296be07c217aac4b625d.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: ide-scsi: fix OOPS in idescsi_expiry() Resume from RAM on HPC nx6325 broken
Diffstat (limited to 'drivers')
-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)
{
ide_drive_t *drive = dev->driver_data;
ide_hwif_t *hwif = HWIF(drive);
- ide_driver_t *drv = to_ide_driver(dev->driver);
struct request rq;
struct request_pm_state rqpm;
ide_task_t args;
@@ -1033,8 +1032,12 @@ static int generic_ide_resume(struct device *dev)
err = ide_do_drive_cmd(drive, &rq, ide_head_wait);
- if (err == 0 && drv && drv->resume)
- drv->resume(drive);
+ if (err == 0 && dev->driver) {
+ ide_driver_t *drv = to_ide_driver(dev->driver);
+
+ if (drv->resume)
+ drv->resume(drive);
+ }
return err;
}
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)
static int idescsi_expiry(ide_drive_t *drive)
{
- idescsi_scsi_t *scsi = drive->driver_data;
+ idescsi_scsi_t *scsi = drive_to_idescsi(drive);
idescsi_pc_t *pc = scsi->pc;
#if IDESCSI_DEBUG_LOG
OpenPOWER on IntegriCloud