mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
pinctrl: stmfx: update the result type of dm_i2c_reg_read
Use int as result of dm_i2c_reg_read to avoid warning with W=1 (warning: comparison is always false due to limited range of data type [-Wtype-limits]) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
@@ -352,11 +352,12 @@ static int stmfx_chip_init(struct udevice *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
|
struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
|
||||||
|
|
||||||
id = dm_i2c_reg_read(dev, STMFX_REG_CHIP_ID);
|
ret = dm_i2c_reg_read(dev, STMFX_REG_CHIP_ID);
|
||||||
if (id < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "error reading chip id: %d\n", id);
|
dev_err(dev, "error reading chip id: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
id = (u8)ret;
|
||||||
/*
|
/*
|
||||||
* Check that ID is the complement of the I2C address:
|
* Check that ID is the complement of the I2C address:
|
||||||
* STMFX I2C address follows the 7-bit format (MSB), that's why
|
* STMFX I2C address follows the 7-bit format (MSB), that's why
|
||||||
|
Reference in New Issue
Block a user