]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: Bugfix in i2c_get_chip_by_phandle()
authorPhilip Oberfichtner <pro@denx.de>
Fri, 24 Nov 2023 14:04:01 +0000 (15:04 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 27 Nov 2023 23:54:56 +0000 (18:54 -0500)
The "i2cbcdev" sneaked in when implementing this function for the
bootcounter use case. Obviously the intention was to use prop_name
instead.

Fixes: b483552773 (i2c: Implement i2c_get_chip_by_phandle())
Signed-off-by: Philip Oberfichtner <pro@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
drivers/i2c/i2c-uclass.c

index 5405067861eb9c66d20854e0a989ff04727ba8fe..98f95859f3bc11975758fc74d755e4ca3a50ebd9 100644 (file)
@@ -427,7 +427,7 @@ int i2c_get_chip_by_phandle(const struct udevice *parent, const char *prop_name,
                goto err_exit;
        }
 
-       ret = dev_read_u32(parent, "i2cbcdev", &phandle);
+       ret = dev_read_u32(parent, prop_name, &phandle);
        if (ret)
                goto err_exit;