linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: roque@di.fc.ul.pt, isdn4linux@listserv.isdn4linux.de
Cc: linux-kernel@vger.kernel.org, trivial@rustcorp.com.au
Subject: [2.6 patch] ISDN PCBIT: #ifdef MODULE some code
Date: Mon, 28 Jul 2003 22:25:01 +0200	[thread overview]
Message-ID: <20030728202500.GM25402@fs.tum.de> (raw)

I got the following error at the final linkage of 2.6.0-test2 if 
CONFIG_ISDN_DRV_PCBIT is compiled statically:

<--  snip  -->

...
  LD      .tmp_vmlinux1
...
drivers/built-in.o(.exit.text+0xe183): In function `pcbit_exit':
: undefined reference to `pcbit_terminate'
make: *** [.tmp_vmlinux1] Error 1

<--  snip  -->


I don't know whether the following patch is the best solution, but it 
solves the problem:

--- linux-2.6.0-test2-full-no-smp/drivers/isdn/pcbit/module.c.tmp	2003-07-28 22:03:38.000000000 +0200
+++ linux-2.6.0-test2-full-no-smp/drivers/isdn/pcbit/module.c	2003-07-28 22:08:57.000000000 +0200
@@ -82,12 +82,14 @@
 
 static void __exit pcbit_exit(void)
 {
+#ifdef MODULE
 	int board;
 
 	for (board = 0; board < num_boards; board++)
 		pcbit_terminate(board);
 	printk(KERN_NOTICE 
 	       "PCBIT-D module unloaded\n");
+#endif
 }
 
 #ifndef MODULE



cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


             reply	other threads:[~2003-07-28 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-28 20:25 Adrian Bunk [this message]
2003-08-15 16:51 ` [2.6 patch] ISDN PCBIT: #ifdef MODULE some code Rusty Russell
2003-08-15 20:46   ` Adrian Bunk
2003-08-16 11:44   ` Karsten Keil

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=20030728202500.GM25402@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roque@di.fc.ul.pt \
    --cc=trivial@rustcorp.com.au \
    /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).