diff options
author | jhb <jhb@FreeBSD.org> | 2006-02-22 18:16:26 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-02-22 18:16:26 +0000 |
commit | 4793b3db380bcaac1d396101ed11d3b3001642e5 (patch) | |
tree | 804a52776d979b0d584c9efe815d95731c11d05d /sys/dev/ppbus | |
parent | 82b4c8972021decda7584eb5dce699df1de06416 (diff) | |
download | FreeBSD-src-4793b3db380bcaac1d396101ed11d3b3001642e5.zip FreeBSD-src-4793b3db380bcaac1d396101ed11d3b3001642e5.tar.gz |
- Use bus_setup_intr() and bus_teardown_intr() to register device driver
interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR().
Uses of the BUS_*() versions in the implementation of foo_intr methods
in bus drivers were not changed. Mostly this just means that some
drivers might start printing diagnostic messages like [FAST] when
appropriate as well as honoring mpsafenet=0.
- Fix two more of the ppbus drivers' identify routines to function
correctly in the mythical case of a machine with more than one ppbus.
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r-- | sys/dev/ppbus/if_plip.c | 2 | ||||
-rw-r--r-- | sys/dev/ppbus/lpt.c | 4 | ||||
-rw-r--r-- | sys/dev/ppbus/ppi.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c index 2b71be4..2af0fd1 100644 --- a/sys/dev/ppbus/if_plip.c +++ b/sys/dev/ppbus/if_plip.c @@ -357,7 +357,7 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data) } /* attach our interrupt handler, later detached when the bus is released */ - if ((error = BUS_SETUP_INTR(ppbus, dev, sc->res_irq, + if ((error = bus_setup_intr(dev, sc->res_irq, INTR_TYPE_NET, lp_intr, dev, &ih))) { ppb_release_bus(ppbus, dev); return (error); diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index dec1084..6296da5 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -342,7 +342,7 @@ lpt_identify(driver_t *driver, device_t parent) device_t dev; - dev = device_find_child(parent, LPT_NAME, 0); + dev = device_find_child(parent, LPT_NAME, -1); if (!dev) BUS_ADD_CHILD(parent, 0, LPT_NAME, -1); } @@ -744,7 +744,7 @@ lptwrite(struct cdev *dev, struct uio *uio, int ioflag) /* if interrupts are working, register the handler */ if (sc->sc_irq & LP_USE_IRQ) { /* register our interrupt handler */ - err = BUS_SETUP_INTR(ppbus, lptdev, sc->intr_resource, + err = bus_setup_intr(lptdev, sc->intr_resource, INTR_TYPE_TTY, lpt_intr, lptdev, &sc->intr_cookie); if (err) { diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c index f689bc1..35be2db 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -135,7 +135,7 @@ ppi_identify(driver_t *driver, device_t parent) device_t dev; - dev = device_find_child(parent, "ppi", 0); + dev = device_find_child(parent, "ppi", -1); if (!dev) BUS_ADD_CHILD(parent, 0, "ppi", -1); } @@ -276,7 +276,7 @@ ppiopen(struct cdev *dev, int flags, int fmt, struct thread *td) #ifdef PERIPH_1284 if (ppi->intr_resource) { /* register our interrupt handler */ - BUS_SETUP_INTR(device_get_parent(ppidev), ppidev, ppi->intr_resource, + bus_setup_intr(ppidev, ppi->intr_resource, INTR_TYPE_TTY, ppiintr, dev, &ppi->intr_cookie); } #endif /* PERIPH_1284 */ |