diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 23:22:43 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 23:22:43 +0100 |
commit | b6a45a0b1e9a358b81201659cf87b023e3ec73e0 (patch) | |
tree | 07a3d4f02f33ec872862f278b4feffc8e5273e90 /drivers/ide/ide-iops.c | |
parent | ide: unexport ide_devset_execute() (diff) | |
download | linux-b6a45a0b1e9a358b81201659cf87b023e3ec73e0.tar.xz linux-b6a45a0b1e9a358b81201659cf87b023e3ec73e0.zip |
ide: move drive_is_ready() to ide-io.c
Move drive_is_ready() to ide-io.c, then make it static.
Also make some minor CodingStyle fixups while at it.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index cd1f2e464c4b..ee9c60342787 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -438,31 +438,6 @@ void ide_fixstring (u8 *s, const int bytecount, const int byteswap) EXPORT_SYMBOL(ide_fixstring); -int drive_is_ready (ide_drive_t *drive) -{ - ide_hwif_t *hwif = drive->hwif; - u8 stat = 0; - - if (drive->waiting_for_dma) - return hwif->dma_ops->dma_test_irq(drive); - - if (hwif->io_ports.ctl_addr && - (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0) - stat = hwif->tp_ops->read_altstatus(hwif); - else - /* Note: this may clear a pending IRQ!! */ - stat = hwif->tp_ops->read_status(hwif); - - if (stat & ATA_BUSY) - /* drive busy: definitely not interrupting */ - return 0; - - /* drive ready: *might* be interrupting */ - return 1; -} - -EXPORT_SYMBOL(drive_is_ready); - /* * This routine busy-waits for the drive status to be not "busy". * It then checks the status for all of the "good" bits and none |