Thread (39 messages) 39 messages, 4 authors, 2015-08-09
STALE3994d
Revisions (6)
  1. v2 current
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 [diff vs current]
  5. v6 [diff vs current]
  6. v7 [diff vs current]

[PATCH v2 02/22] of/platform: Set fwnode field for new devices

From: Tomeu Vizoso <hidden>
Date: 2015-07-28 13:30:39
Also in: linux-acpi, linux-arm-kernel, lkml
Subsystem: open firmware and flattened device tree, the rest · Maintainers: Rob Herring, Saravana Kannan, Linus Torvalds

When allocating a new platform device, set the fwnode field in the
struct device to point to the device_node.

This is needed by platform-independent code that needs to do something
with devices based on the data provided by the firmware.

Signed-off-by: Tomeu Vizoso <redacted>
---

Changes in v2:
- Use set_primary_fwnode()

 drivers/of/platform.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ddf8e42c9367..ff27494cda8c 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -139,6 +139,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
 	}
 
 	dev->dev.of_node = of_node_get(np);
+	set_primary_fwnode(&dev->dev, &dev->dev.of_node->fwnode);
 	dev->dev.parent = parent ? : &platform_bus;
 
 	if (bus_id)
-- 
2.4.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help