Merge branch 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into...
[firefly-linux-kernel-4.4.55.git] / drivers / of / irq.c
index 27212402c53247819cf4edf09e576d2cc69f3136..9bcf2cf19357837dcb6dd8e5cce637150a7a32d0 100644 (file)
@@ -216,6 +216,9 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
                                goto fail;
                        }
 
+                       if (!of_device_is_available(newpar))
+                               match = 0;
+
                        /* Get #interrupt-cells and #address-cells of new
                         * parent
                         */
@@ -435,7 +438,8 @@ void __init of_irq_init(const struct of_device_id *matches)
        INIT_LIST_HEAD(&intc_parent_list);
 
        for_each_matching_node(np, matches) {
-               if (!of_find_property(np, "interrupt-controller", NULL))
+               if (!of_find_property(np, "interrupt-controller", NULL) ||
+                               !of_device_is_available(np))
                        continue;
                /*
                 * Here, we allocate and populate an intc_desc with the node