patch-2.3.30 linux/drivers/char/ppdev.c
Next file: linux/drivers/char/saa7110.c
Previous file: linux/drivers/char/pc110pad.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Sat Nov 27 15:27:48 1999
- Orig file:
v2.3.29/linux/drivers/char/ppdev.c
- Orig date:
Thu Nov 11 20:11:34 1999
diff -u --recursive --new-file v2.3.29/linux/drivers/char/ppdev.c linux/drivers/char/ppdev.c
@@ -43,6 +43,7 @@
*/
#include <linux/module.h>
+#include <linux/init.h>
#include <linux/sched.h>
#include <linux/ioctl.h>
#include <linux/parport.h>
@@ -578,11 +579,7 @@
pp_release
};
-#ifdef MODULE
-#define pp_init init_module
-#endif
-
-int pp_init (void)
+static int __init ppdev_init (void)
{
if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) {
printk (KERN_WARNING CHRDEV ": unable to get major %d\n",
@@ -594,10 +591,11 @@
return 0;
}
-#ifdef MODULE
-void cleanup_module (void)
+static void __exit ppdev_cleanup (void)
{
/* Clean up all parport stuff */
unregister_chrdev (PP_MAJOR, CHRDEV);
}
-#endif /* MODULE */
+
+module_init(ppdev_init);
+module_exit(ppdev_cleanup);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)