[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGETcx8H8axt7r=qrqauJCAuOmg5puR0Bp595yxh1CksjAkNeA@mail.gmail.com>
Date: Thu, 4 Feb 2021 11:17:27 -0800
From: Saravana Kannan <saravanak@...gle.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Marc Zyngier <maz@...nel.org>,
Tudor Ambarus <Tudor.Ambarus@...rochip.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Martin Kaiser <martin@...ser.cx>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Len Brown <lenb@...nel.org>,
Saravana Kannan <saravanak@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v2 3/3] of: property: Don't add links to absent suppliers
On Mon, Feb 1, 2021 at 8:33 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> If driver core marks a firmware node as not a device, don't add fwnode
> links where it's a supplier.
>
> Fixes: e590474768f1 ("driver core: Set fw_devlink=on by default")
> Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> ---
> drivers/of/property.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index 6287c6d60bb7..53d163c8d39b 100644
> --- a/drivers/of/property.c
> +++ b/drivers/of/property.c
> @@ -1103,7 +1103,9 @@ static int of_link_to_phandle(struct device_node *con_np,
> * created for them.
> */
> sup_dev = get_dev_from_fwnode(&sup_np->fwnode);
> - if (!sup_dev && of_node_check_flag(sup_np, OF_POPULATED)) {
> + if (!sup_dev &&
> + (of_node_check_flag(sup_np, OF_POPULATED) ||
> + sup_np->fwnode.flags & FWNODE_FLAG_NOT_DEVICE)) {
> pr_debug("Not linking %pOFP to %pOFP - No struct device\n",
> con_np, sup_np);
> of_node_put(sup_np);
> --
> 2.30.0.365.g02bc693789-goog
>
Rob, Can I get an Ack or reviewed-by for this? I want to land this
patch and another one on driver-core.
Thanks,
Saravana
Powered by blists - more mailing lists