[<prev] [next>] [day] [month] [year] [list]
Message-Id: <E1GXgwp-0005hw-B1@ZenIV.linux.org.uk>
Date: Wed, 11 Oct 2006 17:28:47 +0100
From: Al Viro <viro@....linux.org.uk>
To: torvalds@...l.org
Cc: linux-kernel@...r.kernel.org, linux-m68k@...ts.linux-m68k.org
Subject: [PATCH] z2_init() in non-modular case
... another victim - this time of 2.5.1-pre2
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
drivers/block/z2ram.c | 28 ++++++----------------------
1 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 82ddbdd..7cc2685 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -329,7 +329,7 @@ static struct kobject *z2_find(dev_t dev
static struct request_queue *z2_queue;
-int __init
+static int __init
z2_init(void)
{
int ret;
@@ -370,26 +370,7 @@ err:
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;
blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256);
@@ -425,4 +406,7 @@ cleanup_module( void )
return;
}
-#endif
+
+module_init(z2_init);
+module_exit(z2_exit);
+MODULE_LICENSE("GPL");
--
1.4.2.GIT
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists