diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2015-02-06 17:11:57 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-04-09 21:09:35 -0400 |
commit | eef77801b56b098cd7e1daf8a03854dd203a051c (patch) | |
tree | 7ecd64a6ee2332c0075cef6f329d130ce4a76629 /drivers/scsi | |
parent | 7061dec40c07265f819ae0a6842846f74f889aa9 (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')
-rw-r--r-- | drivers/scsi/aha1542.c | 13 |
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 | |||
91 | 91 | ||
92 | static int aha1542_outb(unsigned int base, u8 val) | 92 | static int aha1542_outb(unsigned int base, u8 val) |
93 | { | 93 | { |
94 | while (1) { | 94 | if (!wait_mask(STATUS(base), CDF, 0, CDF, 0)) |
95 | if (!wait_mask(STATUS(base), CDF, 0, CDF, 0)) | 95 | return 1; |
96 | return 1; | 96 | outb(val, DATA(base)); |
97 | if (inb(STATUS(base)) & CDF) | 97 | |
98 | continue; | 98 | return 0; |
99 | outb(val, DATA(base)); | ||
100 | return 0; | ||
101 | } | ||
102 | } | 99 | } |
103 | 100 | ||
104 | static int aha1542_out(unsigned int base, u8 *buf, int len) | 101 | static int aha1542_out(unsigned int base, u8 *buf, int len) |