diff options
| author | dyoung <dyoung@NetBSD.org> | 2010-03-18 20:52:43 +0000 |
|---|---|---|
| committer | dyoung <dyoung@NetBSD.org> | 2010-03-18 20:52:43 +0000 |
| commit | 8b504d80a5570cb77f415d1199ff5ac1e0a600d9 (patch) | |
| tree | 6cfb7338517d3e3babea61d20bbd0bed4b7ffb22 /sys/dev | |
| parent | 3caa8a56505bece0fc856c96f00a6836d9172c9a (diff) | |
Simplify interrupt (dis)establishment by two source transformations:
- cardbus_intr_disestablish(cc, cf, ih);
+ Cardbus_intr_disestablish(ct, ih);
- ih = cardbus_intr_establish(cc, cf, ...);
+ ih = Cardbus_intr_establish(ct, ...);
The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.
Testers have been enlisted. I will revisit this change if I get any
negative responses.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/cardbus/if_fxp_cardbus.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/cardbus/if_fxp_cardbus.c b/sys/dev/cardbus/if_fxp_cardbus.c index 3ce3c4ca577..d96a863b837 100644 --- a/sys/dev/cardbus/if_fxp_cardbus.c +++ b/sys/dev/cardbus/if_fxp_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_cardbus.c,v 1.46 2010/02/26 00:57:02 dyoung Exp $ */ +/* $NetBSD: if_fxp_cardbus.c,v 1.47 2010/03/18 20:52:43 dyoung Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.46 2010/02/26 00:57:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.47 2010/03/18 20:52:43 dyoung Exp $"); #include "opt_inet.h" #include "rnd.h" @@ -212,8 +212,7 @@ static int fxp_cardbus_enable(struct fxp_softc * sc) { struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *)sc; - cardbus_chipset_tag_t cc = csc->ct->ct_cc; - cardbus_function_tag_t cf = csc->ct->ct_cf; + cardbus_devfunc_t ct = csc->ct; Cardbus_function_enable(csc->ct); @@ -221,7 +220,7 @@ fxp_cardbus_enable(struct fxp_softc * sc) /* Map and establish the interrupt. */ - sc->sc_ih = cardbus_intr_establish(cc, cf, csc->intrline, IPL_NET, + sc->sc_ih = Cardbus_intr_establish(ct, csc->intrline, IPL_NET, fxp_intr, sc); if (NULL == sc->sc_ih) { aprint_error_dev(sc->sc_dev, "couldn't establish interrupt\n"); @@ -235,12 +234,10 @@ static void fxp_cardbus_disable(struct fxp_softc * sc) { struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *)sc; - struct cardbus_devfunc *ct = csc->ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; + cardbus_devfunc_t ct = csc->ct; /* Remove interrupt handler. */ - cardbus_intr_disestablish(cc, cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); Cardbus_function_disable(csc->ct); } @@ -263,7 +260,7 @@ fxp_cardbus_detach(device_t self, int flags) /* * Unhook the interrupt handler. */ - cardbus_intr_disestablish(ct->ct_cc, ct->ct_cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); /* * release bus space and close window |
