diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2008-07-23 13:55:59 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:59 -0400 |
commit | db9d286988b9e905045c536f681e85fa5e3a728b (patch) | |
tree | 874144e07a0498c4d65dd9695f90056cbe45a1cb | |
parent | 776bb0270ea72c40f95347dcac868c9f602dcb3e (diff) |
ide-scsi: use drive->pc_callback instead of pc->callback
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-atapi.c | 10 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 5 |
2 files changed, 5 insertions, 10 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index d5249dfc5546..0e9eeb08da2d 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -31,10 +31,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
31 | debug_log("Enter %s - interrupt handler\n", __func__); | 31 | debug_log("Enter %s - interrupt handler\n", __func__); |
32 | 32 | ||
33 | if (pc->flags & PC_FLAG_TIMEDOUT) { | 33 | if (pc->flags & PC_FLAG_TIMEDOUT) { |
34 | if (drive->media == ide_floppy || drive->media == ide_tape) | 34 | drive->pc_callback(drive); |
35 | drive->pc_callback(drive); | ||
36 | else | ||
37 | pc->callback(drive); | ||
38 | return ide_stopped; | 35 | return ide_stopped; |
39 | } | 36 | } |
40 | 37 | ||
@@ -100,10 +97,7 @@ cmd_finished: | |||
100 | return ide_stopped; | 97 | return ide_stopped; |
101 | } | 98 | } |
102 | /* Command finished - Call the callback function */ | 99 | /* Command finished - Call the callback function */ |
103 | if (drive->media == ide_floppy || drive->media == ide_tape) | 100 | drive->pc_callback(drive); |
104 | drive->pc_callback(drive); | ||
105 | else | ||
106 | pc->callback(drive); | ||
107 | return ide_stopped; | 101 | return ide_stopped; |
108 | } | 102 | } |
109 | 103 | ||
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 659db3f7ae08..37cfec43bd40 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -229,7 +229,6 @@ static int idescsi_check_condition(ide_drive_t *drive, | |||
229 | rq->cmd_type = REQ_TYPE_SENSE; | 229 | rq->cmd_type = REQ_TYPE_SENSE; |
230 | rq->cmd_flags |= REQ_PREEMPT; | 230 | rq->cmd_flags |= REQ_PREEMPT; |
231 | pc->timeout = jiffies + WAIT_READY; | 231 | pc->timeout = jiffies + WAIT_READY; |
232 | pc->callback = ide_scsi_callback; | ||
233 | /* NOTE! Save the failed packet command in "rq->buffer" */ | 232 | /* NOTE! Save the failed packet command in "rq->buffer" */ |
234 | rq->buffer = (void *) failed_cmd->special; | 233 | rq->buffer = (void *) failed_cmd->special; |
235 | pc->scsi_cmd = ((struct ide_atapi_pc *) failed_cmd->special)->scsi_cmd; | 234 | pc->scsi_cmd = ((struct ide_atapi_pc *) failed_cmd->special)->scsi_cmd; |
@@ -465,6 +464,9 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi) | |||
465 | #if IDESCSI_DEBUG_LOG | 464 | #if IDESCSI_DEBUG_LOG |
466 | set_bit(IDESCSI_LOG_CMD, &scsi->log); | 465 | set_bit(IDESCSI_LOG_CMD, &scsi->log); |
467 | #endif /* IDESCSI_DEBUG_LOG */ | 466 | #endif /* IDESCSI_DEBUG_LOG */ |
467 | |||
468 | drive->pc_callback = ide_scsi_callback; | ||
469 | |||
468 | idescsi_add_settings(drive); | 470 | idescsi_add_settings(drive); |
469 | } | 471 | } |
470 | 472 | ||
@@ -616,7 +618,6 @@ static int idescsi_queue (struct scsi_cmnd *cmd, | |||
616 | pc->scsi_cmd = cmd; | 618 | pc->scsi_cmd = cmd; |
617 | pc->done = done; | 619 | pc->done = done; |
618 | pc->timeout = jiffies + cmd->timeout_per_command; | 620 | pc->timeout = jiffies + cmd->timeout_per_command; |
619 | pc->callback = ide_scsi_callback; | ||
620 | 621 | ||
621 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { | 622 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { |
622 | printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number); | 623 | printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number); |