lkml.org 
[lkml]   [2000]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] drivers/md gets md__init/md__exit

Hi

This patch against 2.4.0-test11-pre2 adds __init/__exit
to drivers/md... obvious stuff.
Also it makes modules function more consistent accros raidx.c files...

Regards
--
Bartlomiej Zolnierkiewicz
<bkz@linux-ide.org>
diff -uNr linux-240t11p2/include/linux/raid/md_compatible.h linux/include/linux/raid/md_compatible.h
--- linux-240t11p2/include/linux/raid/md_compatible.h Wed Nov 8 19:50:31 2000
+++ linux/include/linux/raid/md_compatible.h Sat Nov 11 00:46:04 2000
@@ -109,6 +109,7 @@
#include <linux/init.h>

#define md__init __init
+#define md__exit __exit
#define md__initdata __initdata
#define md__initfunc(__arginit) __initfunc(__arginit)

diff -uNr linux-240t11p2/drivers/md/linear.c linux/drivers/md/linear.c
--- linux-240t11p2/drivers/md/linear.c Tue Oct 3 14:27:34 2000
+++ linux/drivers/md/linear.c Sat Nov 11 01:02:02 2000
@@ -190,24 +190,19 @@
status: linear_status,
};

-#ifndef MODULE
-
void md__init linear_init (void)
{
register_md_personality (LINEAR, &linear_personality);
}

-#else
-
-int init_module (void)
+#ifdef MODULE
+int md__init init_module (void)
{
- return (register_md_personality (LINEAR, &linear_personality));
+ return linear_init();
}

-void cleanup_module (void)
+void md__exit cleanup_module (void)
{
unregister_md_personality (LINEAR);
}
-
#endif
-
diff -uNr linux-240t11p2/drivers/md/md.c linux/drivers/md/md.c
--- linux-240t11p2/drivers/md/md.c Fri Nov 10 14:28:42 2000
+++ linux/drivers/md/md.c Sat Nov 11 00:50:07 2000
@@ -3553,7 +3553,7 @@
}
__setup("raid=", raid_setup);
#endif
-static void md_geninit (void)
+static void md__init md_geninit (void)
{
int i;

@@ -3803,12 +3803,12 @@
#endif

#ifdef MODULE
-int init_module (void)
+int md__init init_module (void)
{
return md_init();
}

-static void free_device_names(void)
+static void md__exit free_device_names(void)
{
while (device_names.next != &device_names) {
struct list_head *tmp = device_names.next;
@@ -3818,7 +3818,7 @@
}


-void cleanup_module (void)
+void md__exit cleanup_module (void)
{
struct gendisk **gendisk_ptr;

diff -uNr linux-240t11p2/drivers/md/raid0.c linux/drivers/md/raid0.c
--- linux-240t11p2/drivers/md/raid0.c Tue Oct 3 14:27:34 2000
+++ linux/drivers/md/raid0.c Sat Nov 11 00:55:29 2000
@@ -333,24 +333,19 @@
status: raid0_status,
};

-#ifndef MODULE
-
-void raid0_init (void)
+void md__init raid0_init (void)
{
register_md_personality (RAID0, &raid0_personality);
}

-#else
-
-int init_module (void)
+#ifdef MODULE
+int md__init init_module (void)
{
- return (register_md_personality (RAID0, &raid0_personality));
+ return raid0_init();
}

-void cleanup_module (void)
+void md__exit cleanup_module (void)
{
unregister_md_personality (RAID0);
}
-
#endif
-
diff -uNr linux-240t11p2/drivers/md/raid1.c linux/drivers/md/raid1.c
--- linux-240t11p2/drivers/md/raid1.c Fri Nov 10 14:28:42 2000
+++ linux/drivers/md/raid1.c Sat Nov 11 00:54:06 2000
@@ -1882,18 +1882,18 @@
sync_request: raid1_sync_request
};

-int raid1_init (void)
+int md__init raid1_init (void)
{
return register_md_personality (RAID1, &raid1_personality);
}

#ifdef MODULE
-int init_module (void)
+int md__init init_module (void)
{
return raid1_init();
}

-void cleanup_module (void)
+void md__exit cleanup_module (void)
{
unregister_md_personality (RAID1);
}
diff -uNr linux-240t11p2/drivers/md/raid5.c linux/drivers/md/raid5.c
--- linux-240t11p2/drivers/md/raid5.c Tue Oct 3 14:27:34 2000
+++ linux/drivers/md/raid5.c Sat Nov 11 00:52:15 2000
@@ -2342,7 +2342,7 @@
sync_request: raid5_sync_request
};

-int raid5_init (void)
+int md__init raid5_init (void)
{
int err;

@@ -2359,12 +2359,12 @@
}

#ifdef MODULE
-int init_module (void)
+int md__init init_module (void)
{
return raid5_init();
}

-void cleanup_module (void)
+void md__exit cleanup_module (void)
{
unregister_md_personality (RAID5);
}
diff -uNr linux-240t11p2/drivers/md/xor.c linux/drivers/md/xor.c
--- linux-240t11p2/drivers/md/xor.c Tue Oct 3 14:27:34 2000
+++ linux/drivers/md/xor.c Sat Nov 11 00:59:37 2000
@@ -2575,7 +2575,7 @@
*/
#define SIZE (PAGE_SIZE-6*32)

-static void xor_speed ( struct xor_block_template * func,
+static void md__init xor_speed ( struct xor_block_template * func,
struct buffer_head *b1, struct buffer_head *b2)
{
int speed;
@@ -2650,7 +2650,7 @@

static struct buffer_head b1, b2;

-void calibrate_xor_block(void)
+void md__init calibrate_xor_block(void)
{
if (xor_block)
return;
@@ -2706,7 +2706,7 @@

#else /* __sparc_v9__ */

-void calibrate_xor_block(void)
+void md__init calibrate_xor_block(void)
{
if (xor_block)
return;
@@ -2720,7 +2720,7 @@
MD_EXPORT_SYMBOL(calibrate_xor_block);

#ifdef MODULE
-int init_module(void)
+int md__init init_module(void)
{
calibrate_xor_block();
return 0;
\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.020 / U:7.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site