summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2005-09-29 21:44:34 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2005-09-29 21:44:34 +0000
commit079c31dd38aea9cf7c0dfda4f8d2124729e5fa11 (patch)
tree6a0b95fcc03d724e15519d81f97aeae6e7837376
parent88c35a23d906e30efe01770a599b2f241c82b342 (diff)
Clean up ht_intr_map() a bit.
-rw-r--r--sys/arch/macppc/pci/ht.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/macppc/pci/ht.c b/sys/arch/macppc/pci/ht.c
index ec287ec676f..881e338bc43 100644
--- a/sys/arch/macppc/pci/ht.c
+++ b/sys/arch/macppc/pci/ht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ht.c,v 1.1 2005/09/29 20:52:26 kettenis Exp $ */
+/* $OpenBSD: ht.c,v 1.2 2005/09/29 21:44:33 kettenis Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -299,20 +299,20 @@ ht_conf_write(void *cpv, pcitag_t tag, int offset, pcireg_t data)
}
int
-ht_intr_map(void *cpv, pcitag_t bustag, int buspin, int line,
+ht_intr_map(void *cpv, pcitag_t tag, int pin, int line,
pci_intr_handle_t *ihp)
{
int error = 0;
#ifdef DEBUG
- printf("ht_intr_map: buspin = %d, line = %d\n", buspin, line);
+ printf("ht_intr_map: tag=%x, pin=%d, line=%d\n", tag, pin, line);
#endif
*ihp = -1;
- if (buspin == 0)
+ if (pin == PCI_INTERRUPT_PIN_NONE)
error = 1; /* No IRQ used. */
- else if (buspin > 4) {
- printf("ht_intr_map: bad interrupt pin %d\n", buspin);
+ else if (pin > PCI_INTERRUPT_PIN_MAX) {
+ printf("ht_intr_map: bad interrupt pin %d\n", pin);
error = 1;
}