diff options
author | loos <loos@FreeBSD.org> | 2013-11-12 16:08:23 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2013-11-12 16:08:23 +0000 |
commit | 20e0369ba2677fc0f5d17362ac7448ac4cfe9202 (patch) | |
tree | dad0a9a007eda1601d4572290bec0b60a559ef99 /sys/dev/gpio | |
parent | 0cc3d4a1ddc4b36bc3b75abc736a4db5e562f5cb (diff) | |
download | FreeBSD-src-20e0369ba2677fc0f5d17362ac7448ac4cfe9202.zip FreeBSD-src-20e0369ba2677fc0f5d17362ac7448ac4cfe9202.tar.gz |
Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so
it can be overriden by its OFW/FDT version.
Give a chance for GPIO devices that implement the device_identify method to
attach.
Approved by: adrian (mentor)
Diffstat (limited to 'sys/dev/gpio')
-rw-r--r-- | sys/dev/gpio/gpiobus.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 1b1f420..3b7525f 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -175,7 +175,8 @@ static int gpiobus_probe(device_t dev) { device_set_desc(dev, "GPIO bus"); - return (0); + + return (BUS_PROBE_GENERIC); } static int @@ -209,7 +210,9 @@ gpiobus_attach(device_t dev) /* * Get parent's pins and mark them as unmapped */ + bus_generic_probe(dev); bus_enumerate_hinted_children(dev); + return (bus_generic_attach(dev)); } |