summaryrefslogtreecommitdiffstats
path: root/sys/mips/rt305x
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2015-02-14 20:37:33 +0000
committerloos <loos@FreeBSD.org>2015-02-14 20:37:33 +0000
commitf99164198665820412f4855ab8b17350f958aa40 (patch)
treef8d56b7927af669372bdae23061249ac199a65e8 /sys/mips/rt305x
parent4bd45a787863f28d65a6eb7f5e4bbcaacbf7df7d (diff)
downloadFreeBSD-src-f99164198665820412f4855ab8b17350f958aa40.zip
FreeBSD-src-f99164198665820412f4855ab8b17350f958aa40.tar.gz
MFC r273799:
Make the GPIO children attach to the first unit available and not only to unit 0. This fix a bug where a GPIO controller could fail to attach its children (gpioc and gpiobus) if another GPIO driver attach first.
Diffstat (limited to 'sys/mips/rt305x')
-rw-r--r--sys/mips/rt305x/rt305x_gpio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/mips/rt305x/rt305x_gpio.c b/sys/mips/rt305x/rt305x_gpio.c
index 1d68518..5f7defb 100644
--- a/sys/mips/rt305x/rt305x_gpio.c
+++ b/sys/mips/rt305x/rt305x_gpio.c
@@ -511,9 +511,8 @@ rt305x_gpio_attach(device_t dev)
}
#endif
- device_add_child(dev, "gpioc", device_get_unit(dev));
- device_add_child(dev, "gpiobus", device_get_unit(dev));
-
+ device_add_child(dev, "gpioc", -1);
+ device_add_child(dev, "gpiobus", -1);
return (bus_generic_attach(dev));
}
OpenPOWER on IntegriCloud