]> err.no Git - linux-2.6/commitdiff
ide-tape: use drive->pc_callback instead of pc->callback
authorBorislav Petkov <petkovbb@googlemail.com>
Wed, 23 Jul 2008 17:55:59 +0000 (19:55 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Wed, 23 Jul 2008 17:55:59 +0000 (19:55 +0200)
The if-else block in the IRQ handler is only temporary so that bisect searches
don't break and it'll be removed after converting the remainder of the drivers.

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>
drivers/ide/ide-atapi.c
drivers/ide/ide-tape.c

index 0c4f45247d86eee9dabc34570dd5f23d55c131f3..d5249dfc5546d029e542dde24a11d551a50a7bce 100644 (file)
@@ -31,7 +31,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
        debug_log("Enter %s - interrupt handler\n", __func__);
 
        if (pc->flags & PC_FLAG_TIMEDOUT) {
-               if (drive->media == ide_floppy)
+               if (drive->media == ide_floppy || drive->media == ide_tape)
                        drive->pc_callback(drive);
                else
                        pc->callback(drive);
@@ -100,7 +100,7 @@ cmd_finished:
                        return ide_stopped;
                }
                /* Command finished - Call the callback function */
-               if (drive->media == ide_floppy)
+               if (drive->media == ide_floppy || drive->media == ide_tape)
                        drive->pc_callback(drive);
                else
                        pc->callback(drive);
index 663671f69f88e1028b9a9c7ddfd4cd406c4db371..38ca7b1b7cf9c8d7186075f93febd43b9a09c1a3 100644 (file)
@@ -689,7 +689,6 @@ static void idetape_init_pc(struct ide_atapi_pc *pc)
        pc->buf_size = IDETAPE_PC_BUFFER_SIZE;
        pc->bh = NULL;
        pc->b_data = NULL;
-       pc->callback = ide_tape_callback;
 }
 
 static void idetape_create_request_sense_cmd(struct ide_atapi_pc *pc)
@@ -886,7 +885,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive,
                        pc->error = IDETAPE_ERROR_GENERAL;
                }
                tape->failed_pc = NULL;
-               pc->callback(drive);
+               drive->pc_callback(drive);
                return ide_stopped;
        }
        debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]);
@@ -948,7 +947,7 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive)
                pc->error = IDETAPE_ERROR_GENERAL;
                tape->failed_pc = NULL;
        }
-       pc->callback(drive);
+       drive->pc_callback(drive);
        return ide_stopped;
 }
 
@@ -2465,6 +2464,8 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
        u8 gcw[2];
        u16 *ctl = (u16 *)&tape->caps[12];
 
+       drive->pc_callback = ide_tape_callback;
+
        spin_lock_init(&tape->lock);
        drive->dsc_overlap = 1;
        if (drive->hwif->host_flags & IDE_HFLAG_NO_DSC) {