mach-snapdragon: of_fixup: skip disabled USB nodes
authorCaleb Connolly <caleb.connolly@linaro.org>
Fri, 11 Apr 2025 12:47:40 +0000 (14:47 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 2 May 2025 14:38:02 +0000 (08:38 -0600)
There's no need to waste time fixing up nodes that aren't used on this
device. Skip them.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
arch/arm/mach-snapdragon/of_fixup.c

index 7039930..dcd09ee 100644 (file)
@@ -108,7 +108,9 @@ static void fixup_usb_nodes(struct device_node *root)
        int ret;
 
        while ((glue_np = of_find_compatible_node(glue_np, NULL, "qcom,dwc3"))) {
-               ret = fixup_qcom_dwc3(glue_np);
+               if (!of_device_is_available(glue_np))
+                       continue;
+               ret = fixup_qcom_dwc3(root, glue_np);
                if (ret)
                        log_warning("Failed to fixup node %s: %d\n", glue_np->name, ret);
        }