public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	irda-users@lists.sourceforge.net, linux-irda@pasta.cs.uit.no,
	Jean Tourrilhes <jt@bougret.hpl.hp.com>
Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com,
	linux-net@vger.kernel.org
Subject: [2.4 patch] fix via-ircc.c .text.exit error
Date: Sun, 25 Jan 2004 01:40:30 +0100	[thread overview]
Message-ID: <20040125004030.GE6441@fs.tum.de> (raw)
In-Reply-To: <Pine.LNX.4.58L.0401161207000.28357@logos.cnet>

On Fri, Jan 16, 2004 at 12:11:58PM -0200, Marcelo Tosatti wrote:
>...
> Summary of changes from v2.4.25-pre5 to v2.4.25-pre6
> ============================================
>...
> Jean Tourrilhes:
>...
>   o VIA IrDA driver
>...

I got the following link error in 2.4.25-pre7 when trying to compile 
drivers/net/irda/via-ircc.c statically into the kernel:

<--  snip  -->

...
        -o vmlinux
local symbol 0: discarded in section `.text.exit' from drivers/net/irda/irda.o
make: *** [vmlinux] Error 1

<--  snip  -->


The patch below fixes this issue. It does:
- remove __init/__exit from function prototypes (not needed)
- __init -> __devinit
- __exit -> __devexit
- __devexit_p for via_remove_one


cu
Adrian


--- linux-2.4.25-pre7-full/drivers/net/irda/via-ircc.c.old	2004-01-24 20:19:32.000000000 +0100
+++ linux-2.4.25-pre7-full/drivers/net/irda/via-ircc.c	2004-01-24 20:23:16.000000000 +0100
@@ -79,7 +79,7 @@
 
 /* Some prototypes */
 static int via_ircc_open(int i, chipio_t * info, unsigned int id);
-static int __exit via_ircc_close(struct via_ircc_cb *self);
+static int via_ircc_close(struct via_ircc_cb *self);
 static int via_ircc_setup(chipio_t * info, unsigned int id);
 static int via_ircc_dma_receive(struct via_ircc_cb *self);
 static int via_ircc_dma_receive_complete(struct via_ircc_cb *self,
@@ -107,8 +107,8 @@
 void hwreset(struct via_ircc_cb *self);
 static int via_ircc_dma_xmit(struct via_ircc_cb *self, u16 iobase);
 static int upload_rxdata(struct via_ircc_cb *self, int iobase);
-static int __init via_init_one (struct pci_dev *pcidev, const struct pci_device_id *id);
-static void __exit via_remove_one (struct pci_dev *pdev);
+static int via_init_one (struct pci_dev *pcidev, const struct pci_device_id *id);
+static void via_remove_one (struct pci_dev *pdev);
 
 /* Should use udelay() instead, even if we are x86 only - Jean II */
 void iodelay(int udelay)
@@ -137,7 +137,7 @@
 	.name		= VIA_MODULE_NAME,
 	.id_table	= via_pci_tbl,
 	.probe		= via_init_one,
-	.remove		= via_remove_one,
+	.remove		= __devexit_p(via_remove_one),
 };
 
 
@@ -146,7 +146,7 @@
  *
  *    Initialize chip. Just find out chip type and resource.
  */
-int __init via_ircc_init(void)
+int __devinit via_ircc_init(void)
 {
 	int rc;
 
@@ -168,7 +168,7 @@
 
 }
 
-static int __init via_init_one (struct pci_dev *pcidev, const struct pci_device_id *id)
+static int __devinit via_init_one (struct pci_dev *pcidev, const struct pci_device_id *id)
 {
 	int rc;
         u8 temp,oldPCI_40,oldPCI_44,bTmp,bTmp1;
@@ -288,7 +288,7 @@
  *    Close all configured chips
  *
  */
-static void __exit via_ircc_clean(void)
+static void __devexit via_ircc_clean(void)
 {
 	int i;
 
@@ -301,7 +301,7 @@
 	}
 }
 
-static void __exit via_remove_one (struct pci_dev *pdev)
+static void __devexit via_remove_one (struct pci_dev *pdev)
 {
 #ifdef	HEADMSG
         DBG(printk(KERN_INFO "via_remove_one :  ......\n"));
@@ -310,7 +310,7 @@
 
 }
 
-static void __exit via_ircc_cleanup(void)
+static void __devexit via_ircc_cleanup(void)
 {
 
 #ifdef	HEADMSG
@@ -326,7 +326,7 @@
  *    Open driver instance
  *
  */
-static __init int via_ircc_open(int i, chipio_t * info, unsigned int id)
+static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id)
 {
 	struct net_device *dev;
 	struct via_ircc_cb *self;
@@ -460,7 +460,7 @@
  *    Close driver instance
  *
  */
-static int __exit via_ircc_close(struct via_ircc_cb *self)
+static int __devexit via_ircc_close(struct via_ircc_cb *self)
 {
 	int iobase;
 

  parent reply	other threads:[~2004-01-25  0:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-16 14:11 Linux 2.4.25-pre6 Marcelo Tosatti
2004-01-16 15:34 ` Maciej Soltysiak
2004-01-16 15:52   ` [PATCH 2.6] " Maciej Soltysiak
2004-01-16 18:14     ` Mike Fedyk
2004-01-16 18:25       ` [PATCH 2.6 FIXED] " Maciej Soltysiak
2004-01-20 21:25 ` Lukasz Trabinski
2004-01-20 21:41   ` Marcelo Tosatti
2004-01-21  6:47     ` Lukasz Trabinski
2004-01-21 10:53       ` Marcelo Tosatti
2004-01-21 11:28         ` Lukasz Trabinski
2004-01-21 11:54           ` David Woodhouse
2004-01-21 16:07             ` Lukasz Trabinski
2004-01-21 20:12               ` Marcelo Tosatti
2004-01-28 15:04                 ` David Woodhouse
2004-01-28 17:03                   ` Lukasz Trabinski
2004-02-02 22:24                   ` Lukasz Trabinski
     [not found]                 ` <Pine.LNX.4.58L.0401220929450.18938@logos.cnet>
     [not found]                   ` <Pine.LNX.4.58LT.0401221248560.11640@oceanic.wsisiz.edu.pl>
     [not found]                     ` <Pine.LNX.4.58L.0401221014510.18938@logos.cnet>
     [not found]                       ` <Pine.LNX.4.58LT.0401221334070.2772@oceanic.wsisiz.edu.pl>
2004-02-04 13:26                         ` Marcelo Tosatti
2004-02-04 18:45                           ` Lukasz Trabinski
2004-02-04 23:20                             ` Lukasz Trabinski
2004-01-21 11:01       ` Marcelo Tosatti
2004-01-21 11:07       ` David Woodhouse
2004-01-25  0:40 ` Adrian Bunk [this message]
2004-01-26 19:28   ` [2.4 patch] fix via-ircc.c .text.exit error Jean Tourrilhes
2004-01-26 21:01     ` Adrian Bunk
2004-01-26 21:02       ` David S. Miller
2004-01-26 21:42         ` Jean Tourrilhes
2004-01-26 22:11       ` Jean Tourrilhes

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=20040125004030.GE6441@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=irda-users@lists.sourceforge.net \
    --cc=jgarzik@pobox.com \
    --cc=jt@bougret.hpl.hp.com \
    --cc=linux-irda@pasta.cs.uit.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.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