Re: [net-next PATCH v2 08/14] net: mdiobus: Introduce fwnode_mdiobus_register()

From: Andy Shevchenko
Date: Fri Dec 18 2020 - 10:37:56 EST


On Fri, Dec 18, 2020 at 7:40 AM Calvin Johnson
<calvin.johnson@xxxxxxxxxxx> wrote:
> On Tue, Dec 15, 2020 at 07:53:26PM +0200, Andy Shevchenko wrote:
> > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> > <calvin.johnson@xxxxxxxxxxx> wrote:

...

> > I would rather see this as simple as
> >
> > if (is_of_node(fwnode))
> > return of_mdiobus_register(mdio, to_of_node(fwnode));
> > if (is_acpi_node(fwnode))
> > return acpi_mdiobus_register(mdio, fwnode);
> >
> > where the latter one is defined somewhere in drivers/acpi/.
> Makes sense. I'll do it. But I think it will be better to place
> acpi_mdiobus_register() here itself in the network subsystem, maybe
> /drivers/net/mdio/acpi_mdio.c.

Even better, thanks!

--
With Best Regards,
Andy Shevchenko