From: Julien Grall Date: Tue, 14 Jan 2014 01:41:11 +0000 (+0000) Subject: xen/xenpv: Only add the isa when available X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bf8a3812fda73645b9d55f58b75075dd14e8af91;p=people%2Fjulieng%2Ffreebsd.git xen/xenpv: Only add the isa when available isa device doesn't exist on ARM. --- diff --git a/sys/dev/xen/xenpv.c b/sys/dev/xen/xenpv.c index 50fd9df14912..fb8f2315b465 100644 --- a/sys/dev/xen/xenpv.c +++ b/sys/dev/xen/xenpv.c @@ -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); }