diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2015-08-12 04:03:04 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2015-08-12 04:03:04 +0000 |
| commit | 9def69ec5fdce709902ea961222af87b4934533c (patch) | |
| tree | efc8bc1bbd18beadd77e65015a5a227c54491eb2 /sys/dev/uart/uart_core.c | |
| parent | 53d2ddb3fd356ba70c2e60bd845d8f9d0916825e (diff) | |
Notes
Diffstat (limited to 'sys/dev/uart/uart_core.c')
| -rw-r--r-- | sys/dev/uart/uart_core.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index 20b617b92e2d..96b45299a18a 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -474,14 +474,13 @@ uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan) */ sc->sc_rrid = rid; sc->sc_rtype = SYS_RES_IOPORT; - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, uart_getrange(sc->sc_class), RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, sc->sc_rtype, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) { sc->sc_rrid = rid; sc->sc_rtype = SYS_RES_MEMORY; - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, - &sc->sc_rrid, 0, ~0, uart_getrange(sc->sc_class), - RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, sc->sc_rtype, + &sc->sc_rrid, RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); } @@ -556,8 +555,8 @@ uart_bus_attach(device_t dev) * Re-allocate. We expect that the softc contains the information * collected by uart_bus_probe() intact. */ - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, uart_getrange(sc->sc_class), RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, sc->sc_rtype, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) { mtx_destroy(&sc->sc_hwmtx_s); return (ENXIO); |
