Possible regression 2024.12.0 in parsing "aliases"
Sascha Hauer
s.hauer at pengutronix.de
Thu Dec 12 03:31:42 PST 2024
On Thu, Dec 12, 2024 at 12:30:18PM +0300, Alexander Shiyan wrote:
> Hello.
>
> There seems to be a bug in getting the ID in i2c_add_numbered_adapter()
> It uses dev.parent instead of dev, for example:
> of_alias_get_id(adapter->dev.of_node, "i2c");
>
> And with this everything works as expected.
I don't understand this. In i2c-rockchip.c we have:
i2c->adapter.dev.parent = dev;
i2c->adapter.dev.of_node = dev->of_node;
i2c_add_numbered_adapter(&i2c->adapter);
With that it shouldn't make a difference whether we do this:
adapter->nr = of_alias_get_id(adapter->dev.parent->of_node, "i2c");
or that:
adapter->nr = of_alias_get_id(adapter->dev->of_node, "i2c");
Should be the same device node both times.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list