diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:11 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:11 -0500 |
commit | 22c525b976778cce5bb6f8fdcc70046168c54b1a (patch) | |
tree | 40ab6ef79aa8e059d55e8c55d19fdc4dfe7fdce3 /drivers/ide/ide-lib.c | |
parent | 6a2144146aa2e0eb60e48ba73ac0e1c51346edf6 (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-lib.c')
-rw-r--r-- | drivers/ide/ide-lib.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 3bae2c46924f..dc7e539b4d0b 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -562,27 +562,24 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat) | |||
562 | static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat) | 562 | static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat) |
563 | { | 563 | { |
564 | unsigned long flags; | 564 | unsigned long flags; |
565 | |||
566 | atapi_status_t status; | ||
567 | atapi_error_t error; | 565 | atapi_error_t error; |
568 | 566 | ||
569 | status.all = stat; | ||
570 | error.all = 0; | 567 | error.all = 0; |
571 | local_irq_save(flags); | 568 | local_irq_save(flags); |
572 | printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); | 569 | printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); |
573 | if (status.b.bsy) | 570 | if (stat & BUSY_STAT) |
574 | printk("Busy "); | 571 | printk("Busy "); |
575 | else { | 572 | else { |
576 | if (status.b.drdy) printk("DriveReady "); | 573 | if (stat & READY_STAT) printk("DriveReady "); |
577 | if (status.b.df) printk("DeviceFault "); | 574 | if (stat & WRERR_STAT) printk("DeviceFault "); |
578 | if (status.b.dsc) printk("SeekComplete "); | 575 | if (stat & SEEK_STAT) printk("SeekComplete "); |
579 | if (status.b.drq) printk("DataRequest "); | 576 | if (stat & DRQ_STAT) printk("DataRequest "); |
580 | if (status.b.corr) printk("CorrectedError "); | 577 | if (stat & ECC_STAT) printk("CorrectedError "); |
581 | if (status.b.idx) printk("Index "); | 578 | if (stat & INDEX_STAT) printk("Index "); |
582 | if (status.b.check) printk("Error "); | 579 | if (stat & ERR_STAT) printk("Error "); |
583 | } | 580 | } |
584 | printk("}\n"); | 581 | printk("}\n"); |
585 | if (status.b.check && !status.b.bsy) { | 582 | if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { |
586 | error.all = HWIF(drive)->INB(IDE_ERROR_REG); | 583 | error.all = HWIF(drive)->INB(IDE_ERROR_REG); |
587 | printk("%s: %s: error=0x%02x { ", drive->name, msg, error.all); | 584 | printk("%s: %s: error=0x%02x { ", drive->name, msg, error.all); |
588 | if (error.b.ili) printk("IllegalLengthIndication "); | 585 | if (error.b.ili) printk("IllegalLengthIndication "); |