Re: [PATCH v3] gpio: sim: don't fiddle with GPIOLIB private members

Andy Shevchenko
2023-09-05T16:17:57Z

On Tue, Sep 05, 2023 at 03:05:17PM +0300, Andy Shevchenko wrote:
> On Tue, Sep 05, 2023 at 10:24:13AM +0200, Bartosz Golaszewski wrote:

...

> > + chip->swnode = swnode;
> > + ret = device_for_each_child(dev, chip, gpio_sim_chip_set_device);
> > + if (!ret)
> > + return -ENODEV;
>
> Can bus_find_device_by_fwnode() be used here?

Answering to myself: you already mentioned that this should cover any bus,
so the answer is "no".

But also we have device_find_child() if I understood the purpose of the above
it should suit better, no?