From c47476d7e6801deffc8b3c057d0fbf7d2335a0c2 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sat, 27 Feb 2016 03:38:01 +0000 Subject: Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere(). Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 --- sys/dev/scc/scc_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/dev/scc') diff --git a/sys/dev/scc/scc_core.c b/sys/dev/scc/scc_core.c index 6b0558a95fe9d..905fc64ea1538 100644 --- a/sys/dev/scc/scc_core.c +++ b/sys/dev/scc/scc_core.c @@ -129,8 +129,8 @@ scc_bfe_attach(device_t dev, u_int ipc) * Re-allocate. We expect that the softc contains the information * collected by scc_bfe_probe() intact. */ - sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, cl->cl_channels * size, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_anywhere(dev, sc->sc_rtype, + &sc->sc_rrid, cl->cl_channels * size, RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); @@ -378,13 +378,13 @@ scc_bfe_probe(device_t dev, u_int regshft, u_int rclk, u_int rid) */ 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, cl->cl_channels * size, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_anywhere(dev, sc->sc_rtype, + &sc->sc_rrid, cl->cl_channels * size, RF_ACTIVE); if (sc->sc_rres == NULL) { 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, cl->cl_channels * size, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_anywhere(dev, sc->sc_rtype, + &sc->sc_rrid, cl->cl_channels * size, RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); } -- cgit v1.3