[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vcx8obKAf4NMd_v8yOzoTvM4qHOytpVXyRCy+24Rr5GBw@mail.gmail.com>
Date: Tue, 15 Jun 2021 22:53:19 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Marcin Wojtas <mw@...ihalf.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Grzegorz Jaszczyk <jaz@...ihalf.com>,
Grzegorz Bernacki <gjb@...ihalf.com>, upstream@...ihalf.com,
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@....com>,
Jon Nettleton <jon@...id-run.com>
Subject: Re: [net-next: PATCH 1/3] net: mvmdio: add ACPI support
On Tue, Jun 15, 2021 at 6:14 PM Marcin Wojtas <mw@...ihalf.com> wrote:
> Hi,
> niedz., 13 cze 2021 o 21:20 Andrew Lunn <andrew@...n.ch> napisaĆ(a):
> >
> > > - ret = of_mdiobus_register(bus, pdev->dev.of_node);
> > > + if (pdev->dev.of_node)
> > > + ret = of_mdiobus_register(bus, pdev->dev.of_node);
> > > + else if (is_acpi_node(pdev->dev.fwnode))
> > > + ret = acpi_mdiobus_register(bus, pdev->dev.fwnode);
> > > + else
> > > + ret = -EINVAL;
> >
> >
> > This seems like something which could be put into fwnode_mdio.c.
> >
>
> Agree - I'll create a simple fwnode_mdiobus_register() helper there.
Please, also convert the users that we will not have again some
open-coded examples here and there
https://lore.kernel.org/netdev/162344280835.13501.16334655818490594799.git-patchwork-notify@kernel.org/T/#mff706861dea5d3be037d1546fa9c362b27d5839b
(Btw, note the is_of_node() usage there, so should
fwnode_mdiobus_register() have)
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists