diff options
author | loos <loos@FreeBSD.org> | 2015-02-14 20:37:33 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2015-02-14 20:37:33 +0000 |
commit | f99164198665820412f4855ab8b17350f958aa40 (patch) | |
tree | f8d56b7927af669372bdae23061249ac199a65e8 /sys/arm/rockchip | |
parent | 4bd45a787863f28d65a6eb7f5e4bbcaacbf7df7d (diff) | |
download | FreeBSD-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/arm/rockchip')
-rw-r--r-- | sys/arm/rockchip/rk30xx_gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/rockchip/rk30xx_gpio.c b/sys/arm/rockchip/rk30xx_gpio.c index 2a3288f..fc24947c 100644 --- a/sys/arm/rockchip/rk30xx_gpio.c +++ b/sys/arm/rockchip/rk30xx_gpio.c @@ -504,8 +504,8 @@ rk30_gpio_attach(device_t dev) } sc->sc_gpio_npins = i; - 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); rk30_gpio_sc = sc; |