diff options
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-bfin-twi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 4799c6886946..5fb5f3ee13a2 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c | |||
@@ -307,8 +307,8 @@ static int bfin_twi_do_master_xfer(struct i2c_adapter *adap, | |||
307 | if (!(read_CONTROL(iface) & TWI_ENA)) | 307 | if (!(read_CONTROL(iface) & TWI_ENA)) |
308 | return -ENXIO; | 308 | return -ENXIO; |
309 | 309 | ||
310 | while (read_MASTER_STAT(iface) & BUSBUSY) | 310 | if (read_MASTER_STAT(iface) & BUSBUSY) |
311 | yield(); | 311 | return -EAGAIN; |
312 | 312 | ||
313 | iface->pmsg = msgs; | 313 | iface->pmsg = msgs; |
314 | iface->msg_num = num; | 314 | iface->msg_num = num; |
@@ -407,8 +407,8 @@ int bfin_twi_do_smbus_xfer(struct i2c_adapter *adap, u16 addr, | |||
407 | if (!(read_CONTROL(iface) & TWI_ENA)) | 407 | if (!(read_CONTROL(iface) & TWI_ENA)) |
408 | return -ENXIO; | 408 | return -ENXIO; |
409 | 409 | ||
410 | while (read_MASTER_STAT(iface) & BUSBUSY) | 410 | if (read_MASTER_STAT(iface) & BUSBUSY) |
411 | yield(); | 411 | return -EAGAIN; |
412 | 412 | ||
413 | iface->writeNum = 0; | 413 | iface->writeNum = 0; |
414 | iface->readNum = 0; | 414 | iface->readNum = 0; |