diff options
author | Sean Anderson <seanga2@gmail.com> | 2020-09-15 10:44:39 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-30 08:52:30 -0400 |
commit | b4f11dfcbd0129e16e6548eabee2d8482190835f (patch) | |
tree | a2f1aafe9345e96355720cad8e0cf3b8c589e259 /drivers/i2c | |
parent | e579230b37cc04cef866a74985e9523d2a4079fe (diff) | |
download | u-boot-b4f11dfcbd0129e16e6548eabee2d8482190835f.zip u-boot-b4f11dfcbd0129e16e6548eabee2d8482190835f.tar.gz u-boot-b4f11dfcbd0129e16e6548eabee2d8482190835f.tar.bz2 |
i2c: mxc: Fix dev_err being called on a nonexistant variable
The udevice we are working with is called `bus` and not `dev`.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/mxc_i2c.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index e3d980a..7609594 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -941,7 +941,8 @@ static int mxc_i2c_probe(struct udevice *bus) */ ret = fdt_stringlist_search(fdt, node, "pinctrl-names", "gpio"); if (ret < 0) { - debug("i2c bus %d at 0x%2lx, no gpio pinctrl state.\n", bus->seq, i2c_bus->base); + debug("i2c bus %d at 0x%2lx, no gpio pinctrl state.\n", + bus->seq, i2c_bus->base); } else { ret = gpio_request_by_name_nodev(offset_to_ofnode(node), "scl-gpios", 0, &i2c_bus->scl_gpio, @@ -952,7 +953,9 @@ static int mxc_i2c_probe(struct udevice *bus) if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) || !dm_gpio_is_valid(&i2c_bus->scl_gpio) || ret || ret2) { - dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base); + dev_err(bus, + "i2c bus %d at %lu, fail to request scl/sda gpio\n", + bus->seq, i2c_bus->base); return -EINVAL; } } |