mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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>
This commit is contained in:
parent
7061dec40c
commit
eef77801b5
@ -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)
|
static int aha1542_outb(unsigned int base, u8 val)
|
||||||
{
|
{
|
||||||
while (1) {
|
if (!wait_mask(STATUS(base), CDF, 0, CDF, 0))
|
||||||
if (!wait_mask(STATUS(base), CDF, 0, CDF, 0))
|
return 1;
|
||||||
return 1;
|
outb(val, DATA(base));
|
||||||
if (inb(STATUS(base)) & CDF)
|
|
||||||
continue;
|
return 0;
|
||||||
outb(val, DATA(base));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int aha1542_out(unsigned int base, u8 *buf, int len)
|
static int aha1542_out(unsigned int base, u8 *buf, int len)
|
||||||
|
Loading…
Reference in New Issue
Block a user