i2c: dev: Check for I2C_FUNC_I2C before calling i2c_transfer

It is good practice to check that the underlying adapter supports
I2C transfers before attempting them. The i2c core would eventually
return an error, but it's more efficient to fail early.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
This commit is contained in:
Jean Delvare 2024-05-31 11:34:07 +02:00 • committed by Wolfram Sang
commit 97ca843f6a