]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: mxs: only flag completion when queue is completely done
authorWolfram Sang <w.sang@pengutronix.de>
Fri, 13 Jan 2012 11:14:26 +0000 (12:14 +0100)
committerWolfram Sang <w.sang@pengutronix.de>
Fri, 24 Feb 2012 21:28:27 +0000 (22:28 +0100)
commit752b68bb1b1e725b28b51ff84032e01c2846b05d
treeb86fa5273824030367cb2d45af845b45d2b02982
parent321a767d01de16896a7e28edab521f81c20e6c60
i2c: mxs: only flag completion when queue is completely done

The hardware generates an interrupt for every completed command in the
queue while the code assumed that it will only generate one interrupt
when the queue is empty. So, explicitly check if the queue is really
empty. This patch fixed problems which occurred due to high traffic on
the bus. While we are here, move the completion-initialization after the
parameter error checking.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-mxs.c