summaryrefslogtreecommitdiff
path: root/drivers/scsi/aha1542.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2015-02-06 23:11:57 +0100
committerJames Bottomley <JBottomley@Odin.com>2015-04-09 18:09:35 -0700
commiteef77801b56b098cd7e1daf8a03854dd203a051c (patch)
tree7ecd64a6ee2332c0075cef6f329d130ce4a76629 /drivers/scsi/aha1542.c
parent7061dec40c07265f819ae0a6842846f74f889aa9 (diff)
aha1542: remove loop from aha1542_outb
The loop in aha1542_outb with double-check is no longer needed, remove it. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/aha1542.c')
-rw-r--r--drivers/scsi/aha1542.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index af821f340a85..ec432763a29a 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -91,14 +91,11 @@ static inline bool wait_mask(u16 port, u8 mask, u8 allof, u8 noneof, int timeout
static int aha1542_outb(unsigned int base, u8 val)
{
- while (1) {
- if (!wait_mask(STATUS(base), CDF, 0, CDF, 0))
- return 1;
- if (inb(STATUS(base)) & CDF)
- continue;
- outb(val, DATA(base));
- return 0;
- }
+ if (!wait_mask(STATUS(base), CDF, 0, CDF, 0))
+ return 1;
+ outb(val, DATA(base));
+
+ return 0;
}
static int aha1542_out(unsigned int base, u8 *buf, int len)