From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: don't use default init_module/cleanup_module function names
Date: Tue, 20 Jul 2010 23:41:20 +0200 [thread overview]
Message-ID: <1279662080-17198-1-git-send-email-sven.eckelmann@gmx.de> (raw)
In-Reply-To: <20100719172310.87625ce4.randy.dunlap@oracle.com>
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix two staging drivers to use module_init()/module_exit()
instead of default init_module() and cleanup_module() function names
so that there are no name conflicts when both are built-in.
drivers/staging/dt3155/built-in.o: In function `cleanup_module':
(.text+0xc0): multiple definition of `cleanup_module'
drivers/staging/batman-adv/built-in.o:(.text+0x330): first defined here
drivers/staging/dt3155/built-in.o: In function `init_module':
(.text+0xe60): multiple definition of `init_module'
drivers/staging/batman-adv/built-in.o:(.text+0x400): first defined here
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
[sven.eckelmann@gmx.de: Mark module init and exit functions as static]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
I send this patch again because I had to change the function heads again.
batman-adv/main.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/batman-adv/main.c b/batman-adv/main.c
index 1b3acd1..b51917d 100644
--- a/batman-adv/main.c
+++ b/batman-adv/main.c
@@ -58,7 +58,7 @@ static struct packet_type batman_adv_packet_type __read_mostly = {
struct workqueue_struct *bat_event_workqueue;
-int init_module(void)
+static int __init batman_init(void)
{
int retval;
@@ -127,7 +127,7 @@ end:
return -ENOMEM;
}
-void cleanup_module(void)
+static void __init batman_exit(void)
{
deactivate_module();
@@ -270,6 +270,9 @@ int is_mcast(uint8_t *addr)
return *addr & 0x01;
}
+module_init(batman_init);
+module_exit(batman_exit);
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR(DRIVER_AUTHOR);
--
1.7.1
next prev parent reply other threads:[~2010-07-20 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100719133841.babc9ccb.sfr@canb.auug.org.au>
2010-07-20 0:23 ` [B.A.T.M.A.N.] [PATCH -next] staging: don't use default init_module/cleanup_module function names Randy Dunlap
2010-07-20 7:54 ` Sven Eckelmann
2010-07-20 21:41 ` Sven Eckelmann [this message]
2010-07-20 21:46 ` [B.A.T.M.A.N.] [PATCHv3] batman-adv: " Sven Eckelmann
2010-07-22 15:51 ` Marek Lindner
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=1279662080-17198-1-git-send-email-sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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).