Re: [PATCH v3 8/9] i2c: mux: pinctrl: remove CONFIG_OF dependency and use fwnode API
From: Clément Léger
Date: Thu Mar 31 2022 - 05:41:42 EST
Le Fri, 25 Mar 2022 17:48:19 +0100,
Peter Rosin <peda@xxxxxxxxxx> a écrit :
> >
> > - parent_np = of_parse_phandle(np, "i2c-parent", 0);
> > - if (!parent_np) {
> > + parent_fwnode = fwnode_find_reference(fwnode, "i2c-parent", 0);
> > + if (!parent_fwnode) {
> > dev_err(dev, "Cannot parse i2c-parent\n");
> > return ERR_PTR(-ENODEV);
> > }
> > - parent = of_find_i2c_adapter_by_node(parent_np);
> > - of_node_put(parent_np);
> > - if (!parent)
> > + parent = fwnode_find_i2c_adapter_by_node(parent_fwnode);
> > + if (!parent) {
> > + dev_err(dev, "Cannot find i2c-parent\n");
>
> Why do we need to log this as an error?
Hi Peter, sorry for the late answer, your mail ended up in my SPAM
folder.
Regarding the error logging, you are right, this is not needed. I'll
remove it.
Thanks,
Clément
--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com