diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-05 13:45:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-05 13:45:09 -0700 |
commit | 86ba8b0aee711b01fa5a14868035a3f4d6b1e1d9 (patch) | |
tree | e668317a21cb7bc41969847d8e735a3b11ea35a5 /drivers/i2c/busses/i2c-rk3x.c | |
parent | fb762340e55638332407560396aea380b7af9cbf (diff) | |
parent | 91bfe2989af02e709ca01ccf518c4fbda3efc70f (diff) |
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c bugfixes from Wolfram Sang:
"I2C driver bugfixes for the 3.17 release. Details can be found in the
commit messages, yet I think this is typical driver stuff"
* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
Revert "i2c: rcar: remove spinlock"
i2c: at91: add bound checking on SMBus block length bytes
i2c: rk3x: fix bug that cause transfer fails in master receive mode
i2c: at91: Fix a race condition during signal handling in at91_do_twi_xfer.
i2c: mv64xxx: continue probe when clock-frequency is missing
i2c: rcar: fix MNR interrupt handling
Diffstat (limited to 'drivers/i2c/busses/i2c-rk3x.c')
-rw-r--r-- | drivers/i2c/busses/i2c-rk3x.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index 69e11853e8b..e637c32ae51 100644 --- a/drivers/i2c/busses/i2c-rk3x.c +++ b/drivers/i2c/busses/i2c-rk3x.c @@ -323,6 +323,10 @@ static void rk3x_i2c_handle_read(struct rk3x_i2c *i2c, unsigned int ipd) /* ack interrupt */ i2c_writel(i2c, REG_INT_MBRF, REG_IPD); + /* Can only handle a maximum of 32 bytes at a time */ + if (len > 32) + len = 32; + /* read the data from receive buffer */ for (i = 0; i < len; ++i) { if (i % 4 == 0) |