Add COMEDI_INITCLEANUP_NOMODULE()
authorDavid Schleef <ds@schleef.org>
Fri, 8 Nov 2002 22:01:03 +0000 (22:01 +0000)
committerDavid Schleef <ds@schleef.org>
Fri, 8 Nov 2002 22:01:03 +0000 (22:01 +0000)
include/linux/comedidev.h

index 19c46087304b1c5bc9ce12b78e03629a8464c000..8f798d61ea7ec2d9f8a57e8ad8833ea88c6564d4 100644 (file)
 #define COMEDI_RELEASE "1.0.0"
 #endif
 
+#define COMEDI_INITCLEANUP_NOMODULE(x)                                 \
+       static int __init x ## _init_module(void)                       \
+               {return comedi_driver_register(&(x));}                  \
+       static void __exit x ## _cleanup_module(void)                   \
+               {comedi_driver_unregister(&(x));}                       \
+       module_init(x ## _init_module);                                 \
+       module_exit(x ## _cleanup_module);                                      \
+
 #define COMEDI_INITCLEANUP(x)                                          \
        MODULE_AUTHOR("David A. Schleef <ds@schleef.org>");             \
        MODULE_DESCRIPTION("Comedi low-level driver");                  \