|
@@ -329,7 +329,7 @@ static struct kobject *z2_find(dev_t dev, int *part, void *data)
|
|
|
|
|
|
static struct request_queue *z2_queue;
|
|
static struct request_queue *z2_queue;
|
|
|
|
|
|
-int __init
|
|
|
|
|
|
+static int __init
|
|
z2_init(void)
|
|
z2_init(void)
|
|
{
|
|
{
|
|
int ret;
|
|
int ret;
|
|
@@ -370,26 +370,7 @@ err:
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-#if defined(MODULE)
|
|
|
|
-
|
|
|
|
-MODULE_LICENSE("GPL");
|
|
|
|
-
|
|
|
|
-int
|
|
|
|
-init_module( void )
|
|
|
|
-{
|
|
|
|
- int error;
|
|
|
|
-
|
|
|
|
- error = z2_init();
|
|
|
|
- if ( error == 0 )
|
|
|
|
- {
|
|
|
|
- printk( KERN_INFO DEVICE_NAME ": loaded as module\n" );
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return error;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void
|
|
|
|
-cleanup_module( void )
|
|
|
|
|
|
+static void __exit z2_exit(void)
|
|
{
|
|
{
|
|
int i, j;
|
|
int i, j;
|
|
blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256);
|
|
blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256);
|
|
@@ -425,4 +406,7 @@ cleanup_module( void )
|
|
|
|
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-#endif
|
|
|
|
|
|
+
|
|
|
|
+module_init(z2_init);
|
|
|
|
+module_exit(z2_exit);
|
|
|
|
+MODULE_LICENSE("GPL");
|