diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-07-23 22:26:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-24 08:20:27 +0100 |
commit | 1698ed9f0e2f959d4eb8b8e1c5e8c7157ff273d8 (patch) | |
tree | 285d35f59c3f2d4c8870d54b833eb5e900f9cfa0 /drivers/i2c | |
parent | d511166558a48fdaa9c40075860c37070f8e3125 (diff) | |
download | linux-stable-1698ed9f0e2f959d4eb8b8e1c5e8c7157ff273d8.tar.gz linux-stable-1698ed9f0e2f959d4eb8b8e1c5e8c7157ff273d8.tar.bz2 linux-stable-1698ed9f0e2f959d4eb8b8e1c5e8c7157ff273d8.zip |
i2c: tegra: use core to detect 'no zero length' quirk
[ Upstream commit c96c0f2683804b710531e7b754dcd02b5ded6d4a ]
And don't reimplement in the driver.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-tegra.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index ef13b6ce9d8d..47d196c026ba 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -684,9 +684,6 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, tegra_i2c_flush_fifos(i2c_dev); - if (msg->len == 0) - return -EINVAL; - i2c_dev->msg_buf = msg->buf; i2c_dev->msg_buf_remaining = msg->len; i2c_dev->msg_err = I2C_ERR_NONE; @@ -831,6 +828,7 @@ static const struct i2c_algorithm tegra_i2c_algo = { /* payload size is only 12 bit */ static const struct i2c_adapter_quirks tegra_i2c_quirks = { + .flags = I2C_AQ_NO_ZERO_LEN, .max_read_len = 4096, .max_write_len = 4096 - 12, }; |