From: Sonic Zhang <[email protected]>

Rather than waking up the caller on every byte only to have them go
back to sleep to wait for the whole transfer to finish, wake up the
caller once at the end of the transfer.

Signed-off-by: Sonic Zhang <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
---
 drivers/i2c/busses/i2c-bfin-twi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bfin-twi.c 
b/drivers/i2c/busses/i2c-bfin-twi.c
index aaabd5d..64d4b64 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -263,8 +263,8 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface 
*iface,
                        write_INT_MASK(iface, 0);
                        write_MASTER_CTL(iface, 0);
                }
+               complete(&iface->complete);
        }
-       complete(&iface->complete);
 }
 
 /* Interrupt handler */
-- 
1.7.5.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to