i2c: i801: Add SMBUS_LEN_SENTINEL
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 2 Feb 2024 07:04:06 +0000 (08:04 +0100)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 8 Feb 2024 17:06:46 +0000 (18:06 +0100)
commit29dae4572efb676e4831eee68bc423b9f32c05d0
tree2e7bd3b494a758a662a12772bf995ddabe73368f
parent6ff9d46cd36fbd004b1cd7c9173af5cdfbcd1df1
i2c: i801: Add SMBUS_LEN_SENTINEL

Add a sentinel length value that is used to check whether we should
read and use the length value provided by the slave device.
This simplifies the currently used checks.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-i801.c