aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/isa/wcd.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-11-14 07:35:57 +0000
committerBruce Evans <bde@FreeBSD.org>1995-11-14 07:35:57 +0000
commitb3e24f9ce91bb200d621c57bfa92eac473a435f9 (patch)
tree9c94bad3e616d0070b577e174ae969aefd06ef32 /sys/i386/isa/wcd.c
parenta2c9d3c2906b57db1ee27ef76d5fdf366d043196 (diff)
Changed the first (name) arg of MOD_DEV(), MOD_EXEC() and MOD_MISC()
from a string to an identifier so that it can be used to generate declarations and strings. It's much easier to stringize an identifier than to identifize a string. A uniform naming scheme must be used for the automatically generated things to apply. This is a feature. Used the module identifer to generate prototypes for the module load, unload and stat functions. Removed the few prototypes for these that already existed. Used the module identifier to generate a unique struct tag in MOD_DEV(). This should probably be done for all the MOD_*() macros. Moved the trailing semicolon from the MOD_*() macro definitions to the macro invocations that didn't already (bogusly) have it. Staticized the module load and unload functions. Added function return types for the module load, unload and stat functions. lkm/ibcs2/ibcs2.c: Included <sys/sysproto.h> to get everything prototyped. Cleaned up #includes. lkm/ibcs2/ipfw.c: Cleaned up #includes. lkm/linux/linux.c: The module name had to change from "linux_emulator" to "linux_mod" to be automatically generated. Cleaned up #includes. lkm/syscons/*/*_saver.c: Completed delcarations of function pointers. sys/i386/isa/atapi.c: The module name had to change from "atapi" to "atapi_mod" to be automatically generated. sys/i386/isa/wcd.c: Used the fixed MOD_DEV(). This module has two devices and expanded the macro in the source instead of fixing it. The module names had to change from "wcd" and "rwcd" to "wcd_mod" and "rwcd_mod" to be automatically generated. sys/pccard/pcic.c: The module name had to change from "pcic" to "pcic_mod" to be automatically generated.
Notes
Notes: svn path=/head/; revision=12276
Diffstat (limited to 'sys/i386/isa/wcd.c')
-rw-r--r--sys/i386/isa/wcd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c
index 836cb66cc2f2..72e705e1323a 100644
--- a/sys/i386/isa/wcd.c
+++ b/sys/i386/isa/wcd.c
@@ -1078,10 +1078,8 @@ struct cdevsw dev_rwcd = { wcdropen, wcdrclose, rawread, nowrite, wcdioctl,
* Construct lkm_dev structures (see lkm.h).
* Our bdevsw/cdevsw slot numbers are 19/69.
*/
-static struct lkm_dev wcd_module = {
- LM_DEV, LKM_VERSION, "wcd", 19, LM_DT_BLOCK, { (void*) &dev_wcd } };
-static struct lkm_dev rwcd_module = {
- LM_DEV, LKM_VERSION, "rwcd", 69, LM_DT_CHAR, { (void*) &dev_rwcd } };
+MOD_DEV(wcd, LM_DT_BLOCK, 19, &dev_wcd);
+MOD_DEV(rwcd, LM_DT_CHAR, 69, &dev_rwcd);
/*
* Function called when loading the driver.