[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240708072226.GB3866@thinkpad>
Date: Mon, 8 Jul 2024 12:52:26 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Bert Karwatzki <spasswolf@....de>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
caleb.connolly@...aro.org, bhelgaas@...gle.com,
amit.pundir@...aro.org, neil.armstrong@...aro.org,
Lukas Wunner <lukas@...ner.de>, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org
Subject: Re: [PATCH v2] pci: bus: only call of_platform_populate() if
CONFIG_OF is enabled
On Sun, Jul 07, 2024 at 08:38:28PM +0200, Bert Karwatzki wrote:
> If of_platform_populate() is called when CONFIG_OF is not defined this
> leads to spurious error messages of the following type:
> pci 0000:00:01.1: failed to populate child OF nodes (-19)
> pci 0000:00:02.1: failed to populate child OF nodes (-19)
>
> Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
>
> Signed-off-by: Bert Karwatzki <spasswolf@....de>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
- Mani
> ---
> drivers/pci/bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index e4735428814d..3bab78cc68f7 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -350,7 +350,7 @@ void pci_bus_add_device(struct pci_dev *dev)
>
> pci_dev_assign_added(dev, true);
>
> - if (pci_is_bridge(dev)) {
> + if (IS_ENABLED(CONFIG_OF) && pci_is_bridge(dev)) {
> retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
> &dev->dev);
> if (retval)
> --
> 2.45.2
>
> Just in case this is needed.
>
> Bert Karwatzki
>
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists