From: Mans Rullgard <mans@mansr.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] platform: set of_node in platform_device_register_full()
Date: Sat, 16 Feb 2019 16:45:12 +0000 [thread overview]
Message-ID: <20190216164512.9525-1-mans@mansr.com> (raw)
If the provided fwnode is an OF node, set dev.of_node as well.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
drivers/base/platform.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index dff82a3c2caa..853a1d0e5845 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -512,6 +512,7 @@ struct platform_device *platform_device_register_full(
pdev->dev.parent = pdevinfo->parent;
pdev->dev.fwnode = pdevinfo->fwnode;
+ pdev->dev.of_node = of_node_get(to_of_node(pdev->dev.fwnode));
if (pdevinfo->dma_mask) {
/*
--
2.20.1
next reply other threads:[~2019-02-16 16:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 16:45 Mans Rullgard [this message]
2019-02-17 21:36 ` [PATCH] platform: set of_node in platform_device_register_full() Rafael J. Wysocki
2019-02-18 11:03 ` Måns Rullgård
2019-02-20 9:50 ` Rafael J. Wysocki
2019-02-20 10:41 ` Måns Rullgård
2019-02-20 10:51 ` Rafael J. Wysocki
2019-02-20 11:02 ` Måns Rullgård
2019-02-20 11:08 ` Rafael J. Wysocki
2019-02-20 11:35 ` Mans Rullgard
2019-02-20 11:51 ` Johan Hovold
2019-02-20 12:12 ` Måns Rullgård
2019-02-20 12:18 ` Rafael J. Wysocki
2019-02-20 12:26 ` Måns Rullgård
2019-02-20 21:50 ` Rafael J. Wysocki
2019-02-20 11:53 ` Måns Rullgård
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=20190216164512.9525-1-mans@mansr.com \
--to=mans@mansr.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).