Author: landonf
Date: Fri Jan 19 21:36:28 2018
New Revision: 328174
URL: https://svnweb.freebsd.org/changeset/base/328174

Log:
  bhnd_chipc(4): Fix the assignment of non-wildcard child unit numbers
  introduced in r326102 and r326109; all chipc children should be added with
  a wildcard unit (-1).
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/bhnd/cores/chipc/chipc.c

Modified: head/sys/dev/bhnd/cores/chipc/chipc.c
==============================================================================
--- head/sys/dev/bhnd/cores/chipc/chipc.c       Fri Jan 19 21:20:24 2018        
(r328173)
+++ head/sys/dev/bhnd/cores/chipc/chipc.c       Fri Jan 19 21:36:28 2018        
(r328174)
@@ -295,13 +295,13 @@ chipc_add_children(struct chipc_softc *sc)
         * attached directly to the bhnd(4) bus -- not chipc.
         */
        if (sc->caps.pmu && !sc->caps.aob) {
-               child = BUS_ADD_CHILD(sc->dev, 0, "bhnd_pmu", 0);
+               child = BUS_ADD_CHILD(sc->dev, 0, "bhnd_pmu", -1);
                if (child == NULL) {
                        device_printf(sc->dev, "failed to add pmu\n");
                        return (ENXIO);
                }
        } else if (sc->caps.pwr_ctrl) {
-               child = BUS_ADD_CHILD(sc->dev, 0, "bhnd_pwrctl", 0);
+               child = BUS_ADD_CHILD(sc->dev, 0, "bhnd_pwrctl", -1);
                if (child == NULL) {
                        device_printf(sc->dev, "failed to add pwrctl\n");
                        return (ENXIO);
@@ -309,7 +309,7 @@ chipc_add_children(struct chipc_softc *sc)
        }
 
        /* GPIO */
-       child = BUS_ADD_CHILD(sc->dev, 0, "gpio", 0);
+       child = BUS_ADD_CHILD(sc->dev, 0, "gpio", -1);
        if (child == NULL) {
                device_printf(sc->dev, "failed to add gpio\n");
                return (ENXIO);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to