summaryrefslogtreecommitdiffstats
path: root/sys/arm/lpc
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-10-28 18:33:59 +0000
committerloos <loos@FreeBSD.org>2014-10-28 18:33:59 +0000
commit7dd1b73c3843393e02fb47a35ad7b9bf4dac7c2f (patch)
treed80aa712cc7a8f76cb28507a8696a187f0a27495 /sys/arm/lpc
parentae007aae20de488c994d204240aa025651e5ca22 (diff)
downloadFreeBSD-src-7dd1b73c3843393e02fb47a35ad7b9bf4dac7c2f.zip
FreeBSD-src-7dd1b73c3843393e02fb47a35ad7b9bf4dac7c2f.tar.gz
Make the GPIO children attach to the first unit available and not only to
unit 0. It seems that this 'simplification' was copied to all GPIO drivers in tree. 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/arm/lpc')
-rw-r--r--sys/arm/lpc/lpc_gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/lpc/lpc_gpio.c b/sys/arm/lpc/lpc_gpio.c
index b2310cb..d9536a7 100644
--- a/sys/arm/lpc/lpc_gpio.c
+++ b/sys/arm/lpc/lpc_gpio.c
@@ -192,8 +192,8 @@ lpc_gpio_attach(device_t dev)
lpc_gpio_sc = sc;
- 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