ide: add struct ide_tp_ops (take 2)
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / scsi / ide-scsi.c
index 2a86af91f64a186ebe808580466f07a4d08ac8cd..659db3f7ae08fe820b41d45a3a7b75461f81e46d 100644 (file)
@@ -142,7 +142,8 @@ static void ide_scsi_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
                                unsigned int bcount, int write)
 {
        ide_hwif_t *hwif = drive->hwif;
-       xfer_func_t *xf = write ? hwif->output_data : hwif->input_data;
+       const struct ide_tp_ops *tp_ops = hwif->tp_ops;
+       xfer_func_t *xf = write ? tp_ops->output_data : tp_ops->input_data;
        char *buf;
        int count;
 
@@ -246,9 +247,9 @@ idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
 {
        ide_hwif_t *hwif = drive->hwif;
 
-       if (hwif->read_status(hwif) & (BUSY_STAT | DRQ_STAT))
+       if (hwif->tp_ops->read_status(hwif) & (BUSY_STAT | DRQ_STAT))
                /* force an abort */
-               hwif->exec_command(hwif, WIN_IDLEIMMEDIATE);
+               hwif->tp_ops->exec_command(hwif, WIN_IDLEIMMEDIATE);
 
        rq->errors++;