summaryrefslogtreecommitdiffstats
path: root/drivers/char/pms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pms.c')
-rw-r--r--drivers/char/pms.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/char/pms.c b/drivers/char/pms.c
index 72653aa19..c96570b73 100644
--- a/drivers/char/pms.c
+++ b/drivers/char/pms.c
@@ -22,6 +22,7 @@
#include <linux/malloc.h>
#include <linux/mm.h>
#include <linux/ioport.h>
+#include <linux/init.h>
#include <asm/io.h>
#include <linux/sched.h>
#include <linux/videodev.h>
@@ -1024,21 +1025,11 @@ static int init_mediavision(void)
return 0;
}
-static void shutdown_mediavision(void)
-{
- release_region(io_port,3);
- release_region(0x9A01, 1);
-}
-
/*
- * Module stuff
+ * Initialization and module stuff
*/
-#ifdef MODULE
-int init_module(void)
-#else
-int init_pms_cards(struct video_init *v)
-#endif
+static int __init init_pms_cards(void)
{
printk(KERN_INFO "Mediavision Pro Movie Studio driver 0.02\n");
@@ -1057,15 +1048,21 @@ int init_pms_cards(struct video_init *v)
return video_register_device((struct video_device *)&pms_device, VFL_TYPE_GRABBER);
}
-#ifdef MODULE
-
MODULE_PARM(io_port,"i");
MODULE_PARM(mem_base,"i");
-void cleanup_module(void)
+static void __exit shutdown_mediavision(void)
+{
+ release_region(io_port,3);
+ release_region(0x9A01, 1);
+}
+
+static void __exit cleanup_pms_module(void)
{
shutdown_mediavision();
video_unregister_device((struct video_device *)&pms_device);
}
-#endif
+module_init(init_pms_cards);
+module_exit(cleanup_pms_module);
+