From patchwork Tue Jul 20 21:41:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 330 Return-Path: Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (Postfix) with SMTP id E8E341544D6 for ; Tue, 20 Jul 2010 23:41:20 +0200 (CEST) Received: (qmail invoked by alias); 20 Jul 2010 21:41:19 -0000 Received: from unknown (EHLO sven-desktop.lazhur.ath.cx) [89.246.211.23] by mail.gmx.net (mp068) with SMTP; 20 Jul 2010 23:41:19 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1+1pSE2KmO1Rc0bWhhgraXU6ERM6ggVwSHdCd9C/Q 4RrO8kzs0fBmAC From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 20 Jul 2010 23:41:20 +0200 Message-Id: <1279662080-17198-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <20100719172310.87625ce4.randy.dunlap@oracle.com> References: <20100719172310.87625ce4.randy.dunlap@oracle.com> X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: don't use default init_module/cleanup_module function names X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 21:41:21 -0000 From: Randy Dunlap 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 [sven.eckelmann@gmx.de: Mark module init and exit functions as static] Signed-off-by: Sven Eckelmann --- 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);