Skip to content

Commit

Permalink
bhnd_chipc(4): Fix the assignment of non-wildcard child unit numbers
Browse files Browse the repository at this point in the history
introduced in r326102 and r326109; all chipc children should be added with
a wildcard unit (-1).

Sponsored by:	The FreeBSD Foundation
  • Loading branch information
landonf committed Jan 19, 2018
1 parent ca84c67 commit 5ad00fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/dev/bhnd/cores/chipc/chipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,21 +295,21 @@ 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);
}
}

/* 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);
Expand Down

0 comments on commit 5ad00fa

Please sign in to comment.