diff --git a/share/examples/drivers/make_device_driver.sh b/share/examples/drivers/make_device_driver.sh index e8249770a07..e2bc74c304f 100755 --- a/share/examples/drivers/make_device_driver.sh +++ b/share/examples/drivers/make_device_driver.sh @@ -29,7 +29,7 @@ DONE cat >${UPPER} <>${UPPER} @@ -37,7 +37,7 @@ grep -v GENERIC < GENERIC >>${UPPER} cat >>${UPPER} <../isa/${1}.c <../isa/${1}.c <../isa/${1}.c <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 . */ @@ -219,7 +225,7 @@ do { /* the do-while is a safe way to do this grouping */ \ #define CHECKUNIT_DIAG(RETVAL) #endif /* DIAGNOSTIC */ -void +static void ${1}intr(int unit) { sc_p scp = sca[unit];