summaryrefslogtreecommitdiff
path: root/share/examples/drivers/make_device_driver.sh
diff options
context:
space:
mode:
Diffstat (limited to 'share/examples/drivers/make_device_driver.sh')
-rwxr-xr-xshare/examples/drivers/make_device_driver.sh20
1 files changed, 7 insertions, 13 deletions
diff --git a/share/examples/drivers/make_device_driver.sh b/share/examples/drivers/make_device_driver.sh
index e2bc74c304f4a..e8249770a07ab 100755
--- a/share/examples/drivers/make_device_driver.sh
+++ b/share/examples/drivers/make_device_driver.sh
@@ -29,7 +29,7 @@ DONE
cat >${UPPER} <<DONE
# Configuration file for kernel type: ${UPPER}
ident ${UPPER}
-# \$Id: make_device_driver.sh,v 1.3 1998/01/12 07:47:03 julian Exp $"
+# \$Id: make_device_driver.sh,v 1.2 1997/12/30 03:23:12 julian Exp $"
DONE
grep -v GENERIC < GENERIC >>${UPPER}
@@ -37,7 +37,7 @@ grep -v GENERIC < GENERIC >>${UPPER}
cat >>${UPPER} <<DONE
# trust me, you'll need this
options DDB
-device ${1}0 at isa? port 0x234 bio irq 5
+device ${1}0 at isa? port 0x234 bio irq 5 vector ${1}intr
DONE
cat >../isa/${1}.c <<DONE
@@ -45,7 +45,7 @@ cat >../isa/${1}.c <<DONE
* Copyright ME
*
* ${1} driver
- * \$Id: make_device_driver.sh,v 1.3 1998/01/12 07:47:03 julian Exp $
+ * \$Id: make_device_driver.sh,v 1.2 1997/12/30 03:23:12 julian Exp $
*/
@@ -65,7 +65,7 @@ cat >../isa/${1}.c <<DONE
-/* Function prototypes (these should all be static) */
+/* Function prototypes (these should all be static except for ${1}intr()) */
static d_open_t ${1}open;
static d_close_t ${1}close;
static d_read_t ${1}read;
@@ -76,7 +76,7 @@ static d_poll_t ${1}poll;
static int ${1}probe (struct isa_device *);
static int ${1}attach (struct isa_device *);
#ifdef ${UPPER}_MODULE
-static ointhand2_t ${1}intr; /* should actually have type inthand2_t */
+void ${1}intr(int unit); /* actually defined in ioconf.h (generated file) */
#endif
#define CDEV_MAJOR 20
@@ -172,13 +172,7 @@ ${1}attach (struct isa_device *dev)
{
int unit = dev->id_unit;
sc_p scp = sca[unit];
-
- /*
- * Attach our interrupt handler to the device struct. Our caller
- * will attach it to the hardware soon after we return.
- */
- dev->id_ointr = ${1}intr;
-
+
/*
* Allocate storage for this instance .
*/
@@ -225,7 +219,7 @@ do { /* the do-while is a safe way to do this grouping */ \
#define CHECKUNIT_DIAG(RETVAL)
#endif /* DIAGNOSTIC */
-static void
+void
${1}intr(int unit)
{
sc_p scp = sca[unit];