diff options
author | bde <bde@FreeBSD.org> | 1995-12-16 00:27:59 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-12-16 00:27:59 +0000 |
commit | 662e3ea39bcded2d3a3922028e6ae5d89f9abc25 (patch) | |
tree | 204ae2946bbc3237295ee9384cf275356908e680 /sys/dev/pci | |
parent | 9f28e856714a08750a06cfe61671072870df468d (diff) | |
download | FreeBSD-src-662e3ea39bcded2d3a3922028e6ae5d89f9abc25.zip FreeBSD-src-662e3ea39bcded2d3a3922028e6ae5d89f9abc25.tar.gz |
Completed function declarations and/or added prototypes and/or added
#includes to get prototypes.
pci now uses a different interrupt handler type for interrupts that it
dispatches and the isa interrupt handler type for the interrupts that
it handles.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/pci.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 3e893aa..2b36f8f 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pci.c,v 1.37 1995/12/14 09:54:08 phk Exp $ +** $Id: pci.c,v 1.38 1995/12/15 13:40:20 se Exp $ ** ** General subroutines for the PCI bus. ** pci_configure () @@ -36,7 +36,7 @@ *************************************************************************** */ -#include <pci.h> +#include "pci.h" #if NPCI > 0 /*======================================================== @@ -1245,7 +1245,7 @@ getintdescbymptr (u_int irq, unsigned * mptr) static unsigned pci_mask0 = 0; -int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) +int pci_map_int (pcici_t tag, pci_inthand_t *func, void *arg, unsigned *maskptr) { u_int irq; int result, oldspl; @@ -1317,7 +1317,13 @@ int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) */ result = pcibus->pb_iattach - (irq, (void(*)()) func, (int) arg, maskptr); + /* + * XXX if we get here, then `func' must be pci_int + * so the bogus casts are almost OK since they just + * undo the bogus casts that were needed to pass + * pci_int and its arg to pci_map_int(). + */ + (irq, (inthand2_t *) func, (int) arg, maskptr); if (result) goto conflict; #ifdef NO_SHARED_IRQ @@ -1335,7 +1341,8 @@ int pci_map_int (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr) ** replace old handler by shared-int-handler. */ - result = pcibus->pb_idetach (irq,(void(*)())tail->pcid_handler); + result = pcibus->pb_idetach (irq, + (inthand2_t *) tail->pcid_handler); if (result) printf ("\tCANNOT DETACH INT HANDLER.\n"); @@ -1433,7 +1440,8 @@ int pci_unmap_int (pcici_t tag) ** Remove the old handler. */ - result = pcibus->pb_idetach (irq,(void(*)())this->pcid_handler); + result = pcibus->pb_idetach (irq, + (inthand2_t *) this->pcid_handler); if (result) printf ("\tirq %d: cannot remove handler.\n", irq); @@ -1451,7 +1459,7 @@ int pci_unmap_int (pcici_t tag) printf ("\tirq %d: cannot remove handler.\n", irq); result = pcibus->pb_iattach (irq, - (void(*)()) tail->pcid_handler, + (inthand2_t *) tail->pcid_handler, (int) tail->pcid_argument, tail->pcid_maskptr); |