summaryrefslogtreecommitdiffstats
path: root/sys/i386/eisa/bt74x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/eisa/bt74x.c')
-rw-r--r--sys/i386/eisa/bt74x.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/i386/eisa/bt74x.c b/sys/i386/eisa/bt74x.c
index ab166f6..d170d2e 100644
--- a/sys/i386/eisa/bt74x.c
+++ b/sys/i386/eisa/bt74x.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: bt74x.c,v 1.10 1997/07/20 06:31:09 bde Exp $
+ * $Id: bt74x.c,v 1.11 1997/08/21 19:56:40 bde Exp $
*/
#include "eisa.h"
@@ -100,9 +100,9 @@ static struct eisa_driver bt_eisa_driver = {
DATA_SET (eisadriver_set, bt_eisa_driver);
-static char *bt_match __P((eisa_id_t type));
+static const char *bt_match __P((eisa_id_t type));
-static char*
+static const char*
bt_match(type)
eisa_id_t type;
{
@@ -287,11 +287,16 @@ bt_eisa_attach(e_dev)
{
struct bt_data *bt;
int unit = e_dev->unit;
- int irq = ffs(e_dev->ioconf.irq) - 1;
+ int irq;
resvaddr_t *ioport;
resvaddr_t *eisa_ioport;
u_char level_intr;
+ if (TAILQ_FIRST(&e_dev->ioconf.irqs) == NULL)
+ return (-1);
+
+ irq = TAILQ_FIRST(&e_dev->ioconf.irqs)->irq_no;
+
/*
* The addresses are sorted in increasing order
* so we know the port to pass to the core bt
OpenPOWER on IntegriCloud