mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
pinctrl: mcp23s08: Read spi-present-mask as u8 not u32
The binding (microchip,mcp23s08) specifies microchip,spi-present-mask
as uint8, but driver would read u32, causing type mismatch. Use
device_property_read_u8 to match binding spec, hardware (8 chips max),
& prevent probe failure.
Cc: stable@vger.kernel.org
Fixes: 3ad8d3ec6d ("dt-bindings: pinctrl: convert pinctrl-mcp23s08.txt to yaml format")
Signed-off-by: Judith Mendez <jm@ti.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
parent
8473c3a197
commit
b0c13ec174
|
|
@ -144,13 +144,13 @@ static int mcp23s08_probe(struct spi_device *spi)
|
|||
unsigned int addr;
|
||||
int chips;
|
||||
int ret;
|
||||
u32 v;
|
||||
u8 v;
|
||||
|
||||
info = spi_get_device_match_data(spi);
|
||||
|
||||
ret = device_property_read_u32(dev, "microchip,spi-present-mask", &v);
|
||||
ret = device_property_read_u8(dev, "microchip,spi-present-mask", &v);
|
||||
if (ret) {
|
||||
ret = device_property_read_u32(dev, "mcp,spi-present-mask", &v);
|
||||
ret = device_property_read_u8(dev, "mcp,spi-present-mask", &v);
|
||||
if (ret) {
|
||||
dev_err(dev, "missing spi-present-mask");
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user