mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Emil Kronborg Andersen <emkan@prevas.dk>
To: linux@armlinux.org.uk
Cc: emkan@prevas.dk, gregkh@linuxfoundation.org,
	jirislaby@kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, saravanak@google.com
Subject: [PATCH] serial: amba-pl011: set fwnode from parent device
Date: Fri, 13 Oct 2023 17:47:42 +0200	[thread overview]
Message-ID: <20231013154742.76836-1-emkan@prevas.dk> (raw)

After commit 3fb16866b51d ("driver core: fw_devlink: Make cycle
detection more robust"), consumer devices without their fwnode set
printed errors like the one below:

[    0.261887] uart-pl011 3f201000.serial: Failed to create device link (0x180) with soc:firmware:gpio

To fix this, set the fwnode so fw_devlink can find and handle it
properly.

Fixes: 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust")
Signed-off-by: Emil Kronborg Andersen <emkan@prevas.dk>
---
 drivers/tty/serial/amba-pl011.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 3dc9b0fcab1c..29cef84b71c0 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2798,6 +2798,8 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
 	int portnr, ret;
 	u32 val;
 
+	device_set_node(&dev->dev, dev_fwnode(dev->dev.parent));
+
 	portnr = pl011_find_free_port();
 	if (portnr < 0)
 		return portnr;
-- 
2.41.0


             reply	other threads:[~2023-10-13 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 15:47 Emil Kronborg Andersen [this message]
2023-10-13 21:28 ` Saravana Kannan
2023-10-16 10:04   ` Emil Kronborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231013154742.76836-1-emkan@prevas.dk \
    --to=emkan@prevas.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=saravanak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®