diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:36 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:36 +0100 |
commit | 3ee38302ffc63da93eb0313053a990bb3466e275 (patch) | |
tree | b8d66e808fd6d55972adc29ce072deaf2483af6c /drivers/ide/ide-io.c | |
parent | 313afea7f25cc6d420179e0b316499c164e3e372 (diff) | |
download | blackbird-op-linux-3ee38302ffc63da93eb0313053a990bb3466e275.tar.gz blackbird-op-linux-3ee38302ffc63da93eb0313053a990bb3466e275.zip |
ide: remove ->end_request method
* Handle completion of private driver requests explicitly
for ide_floppy and ide_tape media in ide_kill_rq().
* Remove no longer needed ->end_request method.
There should be no functional changes caused by this patch.
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index da2f97dfa8f8..6eee41beec73 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -178,17 +178,17 @@ EXPORT_SYMBOL(ide_complete_rq); void ide_kill_rq(ide_drive_t *drive, struct request *rq) { + u8 drv_req = blk_special_request(rq) && rq->rq_disk; + u8 media = drive->media; + drive->failed_pc = NULL; - if (drive->media == ide_tape) + if ((media == ide_floppy && drv_req) || media == ide_tape) rq->errors = IDE_DRV_ERROR_GENERAL; - if (blk_special_request(rq) && rq->rq_disk) { - struct ide_driver *drv; - - drv = *(struct ide_driver **)rq->rq_disk->private_data; - drv->end_request(drive, 0, 0); - } else + if ((media == ide_floppy || media == ide_tape) && drv_req) + ide_complete_rq(drive, 0); + else ide_end_request(drive, 0, 0); } |