Message ID | a9ada686e1f1c6f496e423deaf108f1bcfd94d7d.1721123679.git.geert+renesas@glider.be |
---|---|
State | Not Applicable |
Headers | show |
Series | of/platform: Fix inverted check in of_platform_notify() | expand |
Quoting Geert Uytterhoeven (2024-07-16 02:57:25) > 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@glider.be> > --- Thanks. I'm going to fold this into the patch and resend the series.
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) */
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@glider.be> --- drivers/of/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)