summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-18 00:46:26 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-18 00:46:26 +0200
commit7616c0ad2087c7d244b8985390c63059a6223c45 (patch)
treec65d7e5dce8b6ec314b56ad2903c8760e2659753 /drivers/ide/ide-tape.c
parent3ad6776cca21f2456b7288f44f224b344ac3c4d0 (diff)
downloadop-kernel-dev-7616c0ad2087c7d244b8985390c63059a6223c45.zip
op-kernel-dev-7616c0ad2087c7d244b8985390c63059a6223c45.tar.gz
ide: add ide_atapi_{discard_data,write_zeros} inline helpers
Add ide_atapi_{discard_data,write_zeros} inline helpers to <linux/ide.h> and use them instead of home-brewn helpers in ide-{floppy,tape,scsi}. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 0598ecf..bfdc4f4 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -518,16 +518,6 @@ static struct ide_tape_obj *ide_tape_chrdev_get(unsigned int i)
return tape;
}
-/*
- * Too bad. The drive wants to send us data which we are not ready to accept.
- * Just throw it away.
- */
-static void idetape_discard_data(ide_drive_t *drive, unsigned int bcount)
-{
- while (bcount--)
- (void) HWIF(drive)->INB(IDE_DATA_REG);
-}
-
static void idetape_input_buffers(ide_drive_t *drive, idetape_pc_t *pc,
unsigned int bcount)
{
@@ -538,7 +528,7 @@ static void idetape_input_buffers(ide_drive_t *drive, idetape_pc_t *pc,
if (bh == NULL) {
printk(KERN_ERR "ide-tape: bh == NULL in "
"idetape_input_buffers\n");
- idetape_discard_data(drive, bcount);
+ ide_atapi_discard_data(drive, bcount);
return;
}
count = min(
@@ -1152,7 +1142,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
printk(KERN_ERR "ide-tape: The tape wants to "
"send us more data than expected "
"- discarding data\n");
- idetape_discard_data(drive, bcount);
+ ide_atapi_discard_data(drive, bcount);
ide_set_handler(drive, &idetape_pc_intr,
IDETAPE_WAIT_CMD, NULL);
return ide_started;
OpenPOWER on IntegriCloud