summaryrefslogtreecommitdiffstats
path: root/sys/dev/pcf
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-02-22 18:16:26 +0000
committerjhb <jhb@FreeBSD.org>2006-02-22 18:16:26 +0000
commit4793b3db380bcaac1d396101ed11d3b3001642e5 (patch)
tree804a52776d979b0d584c9efe815d95731c11d05d /sys/dev/pcf
parent82b4c8972021decda7584eb5dce699df1de06416 (diff)
downloadFreeBSD-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/pcf')
-rw-r--r--sys/dev/pcf/envctrl.c5
-rw-r--r--sys/dev/pcf/pcf_ebus.c4
-rw-r--r--sys/dev/pcf/pcf_isa.c5
3 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/pcf/envctrl.c b/sys/dev/pcf/envctrl.c
index 25a163c..a567cb7 100644
--- a/sys/dev/pcf/envctrl.c
+++ b/sys/dev/pcf/envctrl.c
@@ -133,7 +133,7 @@ envctrl_attach(device_t dev)
/* reset the chip */
pcf_rst_card(dev, IIC_FASTEST, PCF_DEFAULT_ADDR, NULL);
- rv = BUS_SETUP_INTR(device_get_parent(dev), dev, sc->res_irq,
+ rv = bus_setup_intr(dev, sc->res_irq,
INTR_TYPE_NET /* | INTR_ENTROPY */,
pcf_intr, sc, &sc->intr_cookie);
if (rv) {
@@ -180,8 +180,7 @@ envctrl_detach(device_t dev)
return (rv);
if (sc->res_irq != 0) {
- BUS_TEARDOWN_INTR(device_get_parent(dev), dev, sc->res_irq,
- sc->intr_cookie);
+ bus_teardown_intr(dev, sc->res_irq, sc->intr_cookie);
bus_deactivate_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq);
bus_release_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq);
}
diff --git a/sys/dev/pcf/pcf_ebus.c b/sys/dev/pcf/pcf_ebus.c
index 3ea2051..46511a0 100644
--- a/sys/dev/pcf/pcf_ebus.c
+++ b/sys/dev/pcf/pcf_ebus.c
@@ -193,7 +193,7 @@ pcf_ebus_attach(device_t dev)
pcf_rst_card(dev, IIC_FASTEST, own_addr, NULL);
if (sc->res_irq) {
- rv = BUS_SETUP_INTR(device_get_parent(dev), dev, sc->res_irq,
+ rv = bus_setup_intr(dev, sc->res_irq,
INTR_TYPE_NET /* | INTR_ENTROPY */, pcf_intr, sc,
&sc->intr_cookie);
if (rv) {
@@ -241,7 +241,7 @@ pcf_ebus_detach(device_t dev)
return (rv);
if (sc->res_irq != 0) {
- BUS_TEARDOWN_INTR(device_get_parent(dev), dev, sc->res_irq,
+ bus_teardown_intr(dev, sc->res_irq,
sc->intr_cookie);
bus_deactivate_resource(dev, SYS_RES_IRQ, sc->rid_irq,
sc->res_irq);
diff --git a/sys/dev/pcf/pcf_isa.c b/sys/dev/pcf/pcf_isa.c
index 2de3b45..34ce67d 100644
--- a/sys/dev/pcf/pcf_isa.c
+++ b/sys/dev/pcf/pcf_isa.c
@@ -153,7 +153,7 @@ pcf_isa_attach(device_t dev)
pcf_rst_card(dev, IIC_FASTEST, PCF_DEFAULT_ADDR, NULL);
if (sc->res_irq) {
- rv = BUS_SETUP_INTR(device_get_parent(dev), dev, sc->res_irq,
+ rv = bus_setup_intr(dev, sc->res_irq,
INTR_TYPE_NET /* | INTR_ENTROPY */,
pcf_intr, sc, &sc->intr_cookie);
if (rv) {
@@ -201,8 +201,7 @@ pcf_isa_detach(device_t dev)
return (rv);
if (sc->res_irq != 0) {
- BUS_TEARDOWN_INTR(device_get_parent(dev), dev, sc->res_irq,
- sc->intr_cookie);
+ bus_teardown_intr(dev, sc->res_irq, sc->intr_cookie);
bus_deactivate_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq);
bus_release_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq);
}
OpenPOWER on IntegriCloud