diff options
author | ian <ian@FreeBSD.org> | 2014-02-02 19:17:28 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-02-02 19:17:28 +0000 |
commit | 71d90c04a87e5d83dd12a18e730bf5a49659d712 (patch) | |
tree | f7a07f25a40a264286f85b60ecb1346dd35ef91b /sys/dev/uart | |
parent | 34475ded0642e033e494961693b123591dd96ff8 (diff) | |
download | FreeBSD-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/uart')
-rw-r--r-- | sys/dev/uart/uart_bus_fdt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c index 3630b9c..f434f4f 100644 --- a/sys/dev/uart/uart_bus_fdt.c +++ b/sys/dev/uart/uart_bus_fdt.c @@ -134,6 +134,9 @@ uart_fdt_probe(device_t dev) sc = device_get_softc(dev); + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + cd = ofw_bus_search_compatible(dev, compat_data); if (cd->ocd_data == (uintptr_t)NULL) return (ENXIO); |