From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Subject: [PATCH 3/4] i2c-bfin-twi: wake up waiting processes after transfer has finished Date: Wed, 25 May 2011 16:26:37 -0400 Message-ID: <1306355198-18530-3-git-send-email-vapier@gentoo.org> References: <1306355198-18530-1-git-send-email-vapier@gentoo.org> Return-path: In-Reply-To: <1306355198-18530-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ben Dooks Cc: uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org, Sonic Zhang List-Id: linux-i2c@vger.kernel.org From: Sonic Zhang 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 Signed-off-by: Mike Frysinger --- 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