diff options
| author | Doug Rabson <dfr@FreeBSD.org> | 1998-11-15 18:25:17 +0000 |
|---|---|---|
| committer | Doug Rabson <dfr@FreeBSD.org> | 1998-11-15 18:25:17 +0000 |
| commit | 08b6a4cbee427b68518039a35579f86d2e646bb9 (patch) | |
| tree | fd54512c9c731113c4672699fae373a27076692f /sys/dev | |
| parent | 128d4f3960c20175f0c33050be82862db5378087 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/atkbdc/psm.c | 17 | ||||
| -rw-r--r-- | sys/dev/sio/sio.c | 17 |
2 files changed, 18 insertions, 16 deletions
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 68eb46a69b30c..5b999e1b36af2 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -20,7 +20,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.56 1998/10/22 05:58:40 bde Exp $ + * $Id: psm.c,v 1.1 1998/11/08 18:43:03 dfr Exp $ */ /* @@ -76,6 +76,7 @@ #include <sys/poll.h> #include <sys/syslog.h> #include <sys/malloc.h> +#include <sys/rman.h> #ifdef DEVFS #include <sys/devfsext.h> #endif @@ -85,6 +86,7 @@ #include <machine/clock.h> #include <machine/limits.h> #include <machine/mouse.h> +#include <machine/resource.h> #include <isa/isareg.h> #include <isa/isavar.h> @@ -981,6 +983,8 @@ psmattach(device_t dev) int unit = device_get_unit(dev); struct psm_softc *sc = device_get_softc(dev); void *ih; + struct resource *res; + int zero = 0; if (sc == NULL) /* shouldn't happen */ return (ENXIO); @@ -1023,14 +1027,11 @@ psmattach(device_t dev) if (bootverbose) --verbose; - ih = BUS_CREATE_INTR(device_get_parent(dev), dev, - isa_get_irq(dev), - psmintr, sc); - if (!ih) - return ENXIO; + res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, 0ul, ~0ul, 1, + RF_SHAREABLE | RF_ACTIVE); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, psmintr, sc, + &ih); - BUS_CONNECT_INTR(device_get_parent(dev), ih); - return (0); } diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index d5b48cee1ecba..683c59ea3fb0e 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sio.c,v 1.216 1998/09/26 13:59:26 peter Exp $ + * $Id: sio.c,v 1.217 1998/09/26 14:47:16 dfr Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.215 */ @@ -68,6 +68,7 @@ #include <sys/syslog.h> #include <sys/sysctl.h> #include <sys/bus.h> +#include <sys/rman.h> #ifdef DEVFS #include <sys/devfsext.h> #endif @@ -78,6 +79,7 @@ #include <machine/clock.h> #include <machine/ipl.h> +#include <machine/resource.h> #include <isa/sioreg.h> @@ -921,6 +923,8 @@ sioattach(dev) int s; int unit; void *ih; + struct resource *res; + int zero = 0; u_int flags = isa_get_flags(dev); #if 0 @@ -1136,13 +1140,10 @@ determined_type: ; #endif com->flags = isa_get_flags(dev); /* Heritate id_flags for later */ - ih = BUS_CREATE_INTR(device_get_parent(dev), dev, - isa_get_irq(dev), - siointr, com); - if (!ih) - return ENXIO; - - BUS_CONNECT_INTR(device_get_parent(dev), ih); + res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, 0ul, ~0ul, 1, + RF_SHAREABLE | RF_ACTIVE); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, siointr, com, + &ih); return (0); } |
