mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
dm: fix logic of lists_bind_fdt()
If parameter drv of lists_bind_fdt() is specified, we shall bind only to this very driver and to no other. If the driver drv has an of_match property, we shall only bind to the driver if it matches the compatible string of the device. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9396116d2d
commit
de84a4f0ee
1 changed files with 6 additions and 2 deletions
|
@ -223,10 +223,14 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
|
|||
compat);
|
||||
|
||||
for (entry = driver; entry != driver + n_ents; entry++) {
|
||||
if (drv) {
|
||||
if (drv != entry)
|
||||
continue;
|
||||
if (!entry->of_match)
|
||||
break;
|
||||
}
|
||||
ret = driver_check_compatible(entry->of_match, &id,
|
||||
compat);
|
||||
if ((drv) && (drv == entry))
|
||||
break;
|
||||
if (!ret)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue