From: Bartlomiej Zolnierkiewicz <dake@staszic.waw.pl>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com, mingo@redhat.com
Subject: [PATCH] drivers/md gets md__init/md__exit
Date: Sat, 11 Nov 2000 23:51:19 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.21.0011112346500.11176-200000@tricky> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 222 bytes --]
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>
[-- Attachment #2: Type: TEXT/PLAIN, Size: 4817 bytes --]
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;
reply other threads:[~2000-11-11 22:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0011112346500.11176-200000@tricky \
--to=dake@staszic.waw.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).