]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen/xenpv: Only add the isa when available
authorJulien Grall <julien.grall@linaro.org>
Tue, 14 Jan 2014 01:41:11 +0000 (01:41 +0000)
committerJulien Grall <julien.grall@citrix.com>
Mon, 2 Nov 2015 11:46:55 +0000 (11:46 +0000)
isa device doesn't exist on ARM.

sys/dev/xen/xenpv.c

index 50fd9df14912852c263faaead71c8822c4d4913f..fb8f2315b465630c38a76f10c43ba1de5c40e05a 100644 (file)
@@ -92,8 +92,6 @@ xenpv_probe(device_t dev)
 static int
 xenpv_attach(device_t dev)
 {
-       device_t child;
-
        /*
         * Let our child drivers identify any child devices that they
         * can find.  Once that is done attach any devices that we
@@ -102,12 +100,15 @@ xenpv_attach(device_t dev)
        bus_generic_probe(dev);
        bus_generic_attach(dev);
 
+#ifdef DEV_ISA
        if (!devclass_get_device(devclass_find("isa"), 0)) {
-               child = BUS_ADD_CHILD(dev, 0, "isa", 0);
+               device_t child = BUS_ADD_CHILD(dev, 0, "isa", 0);
+
                if (child == NULL)
                        panic("Failed to attach ISA bus.");
                device_probe_and_attach(child);
        }
+#endif
 
        return (0);
 }