[PATCH] of/platform: Fix inverted check in of_platform_notify()

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

 



The check for of_node_check_flag() was accidentally inverted, causing
i2c-demux-pinctrl to fail on the Koelsch development board:

    i2c-demux-pinctrl i2c-mux1: failed to setup demux-adapter 0 (-19)
    i2c-demux-pinctrl i2c-mux2: failed to setup demux-adapter 0 (-19)
    i2c-demux-pinctrl i2c-mux3: failed to setup demux-adapter 0 (-19)
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with e6ef0000.video
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with e6ef1000.video
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with hdmi-in
    i2c-demux-pinctrl i2c-mux2: Failed to create device link (0x180) with hdmi-out

and anything relying on I2C connected to these muxes fails, too.

Also, loading the 25LC040 DT overlay on Ebisu using the out-of-tree
of-configfs now fails, too.

Fixes: 98290f295fbcf18f ("of/platform: Allow overlays to create platform devices from the root node")
Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
 drivers/of/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index bda6da866cc8f8f6..86be4dfb9323d8fc 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -739,7 +739,7 @@ static int of_platform_notify(struct notifier_block *nb,
 		parent = rd->dn->parent;
 		/* verify that the parent is a bus (or the root node) */
 		if (!of_node_is_root(parent) &&
-		    of_node_check_flag(parent, OF_POPULATED_BUS))
+		    !of_node_check_flag(parent, OF_POPULATED_BUS))
 			return NOTIFY_OK;	/* not for us */
 
 		/* already populated? (driver using of_populate manually) */
-- 
2.34.1





[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