summaryrefslogtreecommitdiffstats
path: root/sys/dev/terasic
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-02-02 19:17:28 +0000
committerian <ian@FreeBSD.org>2014-02-02 19:17:28 +0000
commit71d90c04a87e5d83dd12a18e730bf5a49659d712 (patch)
treef7a07f25a40a264286f85b60ecb1346dd35ef91b /sys/dev/terasic
parent34475ded0642e033e494961693b123591dd96ff8 (diff)
downloadFreeBSD-src-71d90c04a87e5d83dd12a18e730bf5a49659d712.zip
FreeBSD-src-71d90c04a87e5d83dd12a18e730bf5a49659d712.tar.gz
Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines. Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings. Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
Diffstat (limited to 'sys/dev/terasic')
-rw-r--r--sys/dev/terasic/de4led/terasic_de4led_fdt.c3
-rw-r--r--sys/dev/terasic/mtl/terasic_mtl_fdt.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/terasic/de4led/terasic_de4led_fdt.c b/sys/dev/terasic/de4led/terasic_de4led_fdt.c
index 0888d6d..feab933 100644
--- a/sys/dev/terasic/de4led/terasic_de4led_fdt.c
+++ b/sys/dev/terasic/de4led/terasic_de4led_fdt.c
@@ -62,6 +62,9 @@ static int
terasic_de4led_fdt_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (ofw_bus_is_compatible(dev, "sri-cambridge,de4led")) {
device_set_desc(dev, "Terasic DE4 8-element LED");
return (BUS_PROBE_DEFAULT);
diff --git a/sys/dev/terasic/mtl/terasic_mtl_fdt.c b/sys/dev/terasic/mtl/terasic_mtl_fdt.c
index 7ffffb2..0a9b268 100644
--- a/sys/dev/terasic/mtl/terasic_mtl_fdt.c
+++ b/sys/dev/terasic/mtl/terasic_mtl_fdt.c
@@ -59,6 +59,9 @@ static int
terasic_mtl_fdt_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (ofw_bus_is_compatible(dev, "sri-cambridge,mtl")) {
device_set_desc(dev, "Terasic Multi-touch LCD (MTL)");
return (BUS_PROBE_DEFAULT);
OpenPOWER on IntegriCloud