From 57fb5e60974fbb2770aa12b4a72114660228c236 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 22 Feb 2006 18:16:26 +0000 Subject: - 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. --- sys/dev/ppbus/if_plip.c | 2 +- sys/dev/ppbus/lpt.c | 4 ++-- sys/dev/ppbus/ppi.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/dev/ppbus') diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c index 2b71be48f12c..2af0fd1efe5f 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 dec1084eca97..6296da5bf214 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 f689bc14ae52..35be2db3a272 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 */ -- cgit v1.3