]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: tegra: Fix PEC support for SMBUS block read
authorAkhil R <akhilrajeev@nvidia.com>
Thu, 27 Apr 2023 12:39:14 +0000 (18:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:53:34 +0000 (11:53 +0200)
commit7b50dc788293015edb849d82a73b723eaa18bc9a
tree0cb82abd83afd7dce68429a3c10a636bbff25c37
parent34dba0240a885bf3e52f91cd9ab348db0593dbd8
i2c: tegra: Fix PEC support for SMBUS block read

[ Upstream commit 9f855779a3874eee70e9f6be57b5f7774f14e510 ]

Update the msg->len value correctly for SMBUS block read. The discrepancy
went unnoticed as msg->len is used in SMBUS transfers only when a PEC
byte is added.

Fixes: ea1831c3e878 ("i2c: tegra: Add SMBus block read function")
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-tegra.c