diff options
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r-- | drivers/ide/ide-atapi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index f17a00ccbe96..6789b81ea78d 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -22,6 +22,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
22 | void (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned, int)) | 22 | void (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned, int)) |
23 | { | 23 | { |
24 | ide_hwif_t *hwif = drive->hwif; | 24 | ide_hwif_t *hwif = drive->hwif; |
25 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; | ||
25 | xfer_func_t *xferfunc; | 26 | xfer_func_t *xferfunc; |
26 | unsigned int temp; | 27 | unsigned int temp; |
27 | u16 bcount; | 28 | u16 bcount; |
@@ -35,7 +36,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
35 | } | 36 | } |
36 | 37 | ||
37 | /* Clear the interrupt */ | 38 | /* Clear the interrupt */ |
38 | stat = hwif->read_status(hwif); | 39 | stat = tp_ops->read_status(hwif); |
39 | 40 | ||
40 | if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) { | 41 | if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) { |
41 | if (hwif->dma_ops->dma_end(drive) || | 42 | if (hwif->dma_ops->dma_end(drive) || |
@@ -140,7 +141,7 @@ cmd_finished: | |||
140 | if (pc->sg) | 141 | if (pc->sg) |
141 | io_buffers(drive, pc, temp, 0); | 142 | io_buffers(drive, pc, temp, 0); |
142 | else | 143 | else |
143 | hwif->input_data(drive, NULL, | 144 | tp_ops->input_data(drive, NULL, |
144 | pc->cur_pos, temp); | 145 | pc->cur_pos, temp); |
145 | printk(KERN_ERR "%s: transferred %d of " | 146 | printk(KERN_ERR "%s: transferred %d of " |
146 | "%d bytes\n", | 147 | "%d bytes\n", |
@@ -157,9 +158,9 @@ cmd_finished: | |||
157 | debug_log("The device wants to send us more data than " | 158 | debug_log("The device wants to send us more data than " |
158 | "expected - allowing transfer\n"); | 159 | "expected - allowing transfer\n"); |
159 | } | 160 | } |
160 | xferfunc = hwif->input_data; | 161 | xferfunc = tp_ops->input_data; |
161 | } else | 162 | } else |
162 | xferfunc = hwif->output_data; | 163 | xferfunc = tp_ops->output_data; |
163 | 164 | ||
164 | if ((drive->media == ide_floppy && !scsi && !pc->buf) || | 165 | if ((drive->media == ide_floppy && !scsi && !pc->buf) || |
165 | (drive->media == ide_tape && !scsi && pc->bh) || | 166 | (drive->media == ide_tape && !scsi && pc->bh) || |
@@ -188,7 +189,7 @@ static u8 ide_read_ireason(ide_drive_t *drive) | |||
188 | memset(&task, 0, sizeof(task)); | 189 | memset(&task, 0, sizeof(task)); |
189 | task.tf_flags = IDE_TFLAG_IN_NSECT; | 190 | task.tf_flags = IDE_TFLAG_IN_NSECT; |
190 | 191 | ||
191 | drive->hwif->tf_read(drive, &task); | 192 | drive->hwif->tp_ops->tf_read(drive, &task); |
192 | 193 | ||
193 | return task.tf.nsect & 3; | 194 | return task.tf.nsect & 3; |
194 | } | 195 | } |
@@ -249,7 +250,7 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
249 | 250 | ||
250 | /* Send the actual packet */ | 251 | /* Send the actual packet */ |
251 | if ((pc->flags & PC_FLAG_ZIP_DRIVE) == 0) | 252 | if ((pc->flags & PC_FLAG_ZIP_DRIVE) == 0) |
252 | hwif->output_data(drive, NULL, pc->c, 12); | 253 | hwif->tp_ops->output_data(drive, NULL, pc->c, 12); |
253 | 254 | ||
254 | return ide_started; | 255 | return ide_started; |
255 | } | 256 | } |