]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: mv64xxx: refactor message start to ensure proper initialization
authorWolfram Sang <wsa@the-dreams.de>
Thu, 13 Feb 2014 20:36:29 +0000 (21:36 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 15 Feb 2014 14:42:31 +0000 (15:42 +0100)
commit394660a682b17539424841290ced0e35345beb53
tree309b4ca8949adaeb4f31e5cfabbc51a30a772c04
parent5be6c96b0213ddc8bece5d066b36639b99a8bc26
i2c: mv64xxx: refactor message start to ensure proper initialization

Because the offload mechanism can fall back to a standard transfer,
having two seperate initialization states is unfortunate. Let's just
have one state which does things consistently. This fixes a bug where
some preparation was missing when the fallback happened. And it makes
the code much easier to follow. To implement this, we put the check
if offload is possible at the top of the offload setup function.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: stable@vger.kernel.org # v3.12+
Fixes: 6ac3813adf79 (i2c: mv64xxx: Add I2C Transaction Generator support)
drivers/i2c/busses/i2c-mv64xxx.c