summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 19:55:54 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 19:55:54 +0200
commit1823649b5abb77ffe638178bc5253249d3ecd17d (patch)
tree154d876b89cf010568d18105913c7fbca8d7cba9 /drivers/ide/ide-atapi.c
parent88a72109b2256bf2974f324a8f890b4a06faf7e9 (diff)
downloadlinux-1823649b5abb77ffe638178bc5253249d3ecd17d.tar.bz2
ide: add ide_read_bcount_and_ireason() helper
Add ide_read_bcount_and_ireason() helper and use it instead of ->INB in {cdrom_newpc,ide_pc}_intr(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index bfab5c4afc6a..f17a00ccbe96 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -107,11 +107,9 @@ cmd_finished:
ide_dma_off(drive);
return ide_do_reset(drive);
}
- /* Get the number of bytes to transfer on this interrupt. */
- bcount = (hwif->INB(hwif->io_ports.lbah_addr) << 8) |
- hwif->INB(hwif->io_ports.lbam_addr);
- ireason = hwif->INB(hwif->io_ports.nsect_addr);
+ /* Get the number of bytes to transfer on this interrupt. */
+ ide_read_bcount_and_ireason(drive, &bcount, &ireason);
if (ireason & CD) {
printk(KERN_ERR "%s: CoD != 0 in %s\n", drive->name, __func__);