aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:11 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:11 -0500
commit22c525b976778cce5bb6f8fdcc70046168c54b1a (patch)
tree40ab6ef79aa8e059d55e8c55d19fdc4dfe7fdce3 /drivers/ide/ide-floppy.c
parent6a2144146aa2e0eb60e48ba73ac0e1c51346edf6 (diff)
ide: remove ata_status_t and atapi_status_t
Remove ata_status_t (unused) and atapi_status_t. While at it: * replace 'HWIF(drive)' by 'drive->hwif' (or just 'hwif' where possible) Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 53f90257a8f0..7b94c7aff256 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -788,12 +788,12 @@ static void idefloppy_retry_pc (ide_drive_t *drive)
788static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) 788static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive)
789{ 789{
790 idefloppy_floppy_t *floppy = drive->driver_data; 790 idefloppy_floppy_t *floppy = drive->driver_data;
791 atapi_status_t status;
792 atapi_bcount_t bcount; 791 atapi_bcount_t bcount;
793 atapi_ireason_t ireason; 792 atapi_ireason_t ireason;
794 idefloppy_pc_t *pc = floppy->pc; 793 idefloppy_pc_t *pc = floppy->pc;
795 struct request *rq = pc->rq; 794 struct request *rq = pc->rq;
796 unsigned int temp; 795 unsigned int temp;
796 u8 stat;
797 797
798 debug_log(KERN_INFO "ide-floppy: Reached %s interrupt handler\n", 798 debug_log(KERN_INFO "ide-floppy: Reached %s interrupt handler\n",
799 __FUNCTION__); 799 __FUNCTION__);
@@ -809,16 +809,16 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive)
809 } 809 }
810 810
811 /* Clear the interrupt */ 811 /* Clear the interrupt */
812 status.all = HWIF(drive)->INB(IDE_STATUS_REG); 812 stat = drive->hwif->INB(IDE_STATUS_REG);
813 813
814 if (!status.b.drq) { /* No more interrupts */ 814 if ((stat & DRQ_STAT) == 0) { /* No more interrupts */
815 debug_log(KERN_INFO "Packet command completed, %d bytes " 815 debug_log(KERN_INFO "Packet command completed, %d bytes "
816 "transferred\n", pc->actually_transferred); 816 "transferred\n", pc->actually_transferred);
817 clear_bit(PC_DMA_IN_PROGRESS, &pc->flags); 817 clear_bit(PC_DMA_IN_PROGRESS, &pc->flags);
818 818
819 local_irq_enable_in_hardirq(); 819 local_irq_enable_in_hardirq();
820 820
821 if (status.b.check || test_bit(PC_DMA_ERROR, &pc->flags)) { 821 if ((stat & ERR_STAT) || test_bit(PC_DMA_ERROR, &pc->flags)) {
822 /* Error detected */ 822 /* Error detected */
823 debug_log(KERN_INFO "ide-floppy: %s: I/O error\n", 823 debug_log(KERN_INFO "ide-floppy: %s: I/O error\n",
824 drive->name); 824 drive->name);
@@ -1632,14 +1632,14 @@ static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg)
1632 /* Else assume format_unit has finished, and we're 1632 /* Else assume format_unit has finished, and we're
1633 ** at 0x10000 */ 1633 ** at 0x10000 */
1634 } else { 1634 } else {
1635 atapi_status_t status;
1636 unsigned long flags; 1635 unsigned long flags;
1636 u8 stat;
1637 1637
1638 local_irq_save(flags); 1638 local_irq_save(flags);
1639 status.all = HWIF(drive)->INB(IDE_STATUS_REG); 1639 stat = drive->hwif->INB(IDE_STATUS_REG);
1640 local_irq_restore(flags); 1640 local_irq_restore(flags);
1641 1641
1642 progress_indication = !status.b.dsc ? 0 : 0x10000; 1642 progress_indication = ((stat & SEEK_STAT) == 0) ? 0 : 0x10000;
1643 } 1643 }
1644 if (put_user(progress_indication, arg)) 1644 if (put_user(progress_indication, arg))
1645 return (-EFAULT); 1645 return (-EFAULT);