drivers/i2c/designware/dw_i2c: return enum cb_err from dw_i2c_transfer
Using enum cb_err as return type instead of int improves the readability of the code. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ic1812c4d8d2b4d9ad331a787bd302a4f0707c1fe Reviewed-on: https://review.coreboot.org/c/coreboot/+/61513 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
@@ -111,11 +111,8 @@ int dw_i2c_gen_speed_config(uintptr_t dw_i2c_addr,
|
||||
|
||||
/*
|
||||
* Process given I2C segments in a single transfer
|
||||
* Return value:
|
||||
* -1 = failure
|
||||
* 0 = success
|
||||
*/
|
||||
int dw_i2c_transfer(unsigned int bus,
|
||||
enum cb_err dw_i2c_transfer(unsigned int bus,
|
||||
const struct i2c_msg *segments,
|
||||
size_t count);
|
||||
|
||||
|
Reference in New Issue
Block a user