From: David Schleef Date: Fri, 8 Nov 2002 22:01:03 +0000 (+0000) Subject: Add COMEDI_INITCLEANUP_NOMODULE() X-Git-Tag: r0_7_66~48 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e33ef0563e21c5d1dff058dbfb6730a19693411e;p=comedi.git Add COMEDI_INITCLEANUP_NOMODULE() --- diff --git a/include/linux/comedidev.h b/include/linux/comedidev.h index 19c46087..8f798d61 100644 --- a/include/linux/comedidev.h +++ b/include/linux/comedidev.h @@ -47,6 +47,14 @@ #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 "); \ MODULE_DESCRIPTION("Comedi low-level driver"); \