lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 8/9] i2c: mux: pinctrl: remove CONFIG_OF dependency and use fwnode API
Le Fri, 25 Mar 2022 17:48:19 +0100,
Peter Rosin <peda@axentia.se> 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

\
 
 \ /
  Last update: 2022-03-31 11:42    [W:0.048 / U:1.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site