aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index c6eec0413a6c..4e59239fef75 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1970,7 +1970,7 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
1970 printk(KERN_ERR "ide-tape: The tape wants to issue more " 1970 printk(KERN_ERR "ide-tape: The tape wants to issue more "
1971 "interrupts in DMA mode\n"); 1971 "interrupts in DMA mode\n");
1972 printk(KERN_ERR "ide-tape: DMA disabled, reverting to PIO\n"); 1972 printk(KERN_ERR "ide-tape: DMA disabled, reverting to PIO\n");
1973 (void)__ide_dma_off(drive); 1973 ide_dma_off(drive);
1974 return ide_do_reset(drive); 1974 return ide_do_reset(drive);
1975 } 1975 }
1976 /* Get the number of bytes to transfer on this interrupt. */ 1976 /* Get the number of bytes to transfer on this interrupt. */
@@ -2176,7 +2176,7 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
2176 if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) { 2176 if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) {
2177 printk(KERN_WARNING "ide-tape: DMA disabled, " 2177 printk(KERN_WARNING "ide-tape: DMA disabled, "
2178 "reverting to PIO\n"); 2178 "reverting to PIO\n");
2179 (void)__ide_dma_off(drive); 2179 ide_dma_off(drive);
2180 } 2180 }
2181 if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma) 2181 if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
2182 dma_ok = !hwif->dma_setup(drive); 2182 dma_ok = !hwif->dma_setup(drive);
@@ -4792,15 +4792,10 @@ static int idetape_open(struct inode *inode, struct file *filp)
4792{ 4792{
4793 struct gendisk *disk = inode->i_bdev->bd_disk; 4793 struct gendisk *disk = inode->i_bdev->bd_disk;
4794 struct ide_tape_obj *tape; 4794 struct ide_tape_obj *tape;
4795 ide_drive_t *drive;
4796 4795
4797 if (!(tape = ide_tape_get(disk))) 4796 if (!(tape = ide_tape_get(disk)))
4798 return -ENXIO; 4797 return -ENXIO;
4799 4798
4800 drive = tape->drive;
4801
4802 drive->usage++;
4803
4804 return 0; 4799 return 0;
4805} 4800}
4806 4801
@@ -4808,9 +4803,6 @@ static int idetape_release(struct inode *inode, struct file *filp)
4808{ 4803{
4809 struct gendisk *disk = inode->i_bdev->bd_disk; 4804 struct gendisk *disk = inode->i_bdev->bd_disk;
4810 struct ide_tape_obj *tape = ide_tape_g(disk); 4805 struct ide_tape_obj *tape = ide_tape_g(disk);
4811 ide_drive_t *drive = tape->drive;
4812
4813 drive->usage--;
4814 4806
4815 ide_tape_put(tape); 4807 ide_tape_put(tape);
4816 4808