From: Doug Anderson Date: Tue, 30 Aug 2011 17:46:10 +0000 (-0600) Subject: i2c-tegra: fix possible race condition after tx X-Git-Tag: v3.1-rc6~21^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96219c3a257cc8ba3b3cae67efdc88be37cf7c9d;p=pandora-kernel.git i2c-tegra: fix possible race condition after tx In tegra_i2c_fill_tx_fifo, once we have finished pushing all the bytes to the I2C hardware controller, the interrupt might happen before we have updated i2c_dev->msg_buf_remaining at the end of the function. Then, in tegra_i2c_isr, we will call again tegra_i2c_fill_tx_fifo triggering weird behaviour. This has been shown to happen under real conditions. Signed-off-by: Doug Anderson Tested-by: Vincent Palatin Acked-by: Rhyland Klein Acked-by: Stephen Warren Signed-off-by: Stephen Warren Signed-off-by: Ben Dooks --- Reading git-diff-tree failed