[PATCH v1 4/4] mtd: mtdpart: Allow fwnode links to NVMEM compatible fwnodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reverts commit fb42378dcc7f247df56f0ecddfdae85487495fbc
("mtd: mtdpart: Don't create platform device that'll never probe").

That commit is a manual named exception in order to avoid fw_devlink links
to an "nvmem-cells" compatible node which is a descendant of the fwnode
that represents the real supplier device that probes.

The commit does not work for newer cases, like the "fixed-layout"
compatible nodes, but instead of adding another compatible string,
remove this workaround as it is no longer needed after
the previous few commits which handle the situation in a generic way
for all supplier nodes that are a child or further descendant fwnode
of a parent device that can probe, including when the consumer device
has a probe attempt before the supplier device, by using an existing
incorrect fwnode or device link to recreate the correct one.

Signed-off-by: Michael Pratt <mcpratt@xxxxx>
---
 drivers/mtd/mtdpart.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 6811a714349d..dd2b27674f56 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -582,7 +582,6 @@ static int mtd_part_of_parse(struct mtd_info *master,
 {
 	struct mtd_part_parser *parser;
 	struct device_node *np;
-	struct device_node *child;
 	struct property *prop;
 	struct device *dev;
 	const char *compat;
@@ -600,15 +599,6 @@ static int mtd_part_of_parse(struct mtd_info *master,
 	else
 		np = of_get_child_by_name(np, "partitions");
 
-	/*
-	 * Don't create devices that are added to a bus but will never get
-	 * probed. That'll cause fw_devlink to block probing of consumers of
-	 * this partition until the partition device is probed.
-	 */
-	for_each_child_of_node(np, child)
-		if (of_device_is_compatible(child, "nvmem-cells"))
-			of_node_set_flag(child, OF_POPULATED);
-
 	of_property_for_each_string(np, "compatible", prop, compat) {
 		parser = mtd_part_get_compatible_parser(compat);
 		if (!parser)
-- 
2.30.2







[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux