[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190216164512.9525-1-mans@mansr.com>
Date: Sat, 16 Feb 2019 16:45:12 +0000
From: Mans Rullgard <mans@...sr.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] platform: set of_node in platform_device_register_full()
If the provided fwnode is an OF node, set dev.of_node as well.
Signed-off-by: Mans Rullgard <mans@...sr.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
Powered by blists - more mailing lists