public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] fix .text.exit error in dmfe.c
@ 2002-06-26  4:18 Paul Vojta
  2002-06-26  9:22 ` Adrian Bunk
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Vojta @ 2002-06-26  4:18 UTC (permalink / raw)
  To: linux-kernel

Folks:

When I compile dmfe.o statically into the 2.5.24 kernel, I get:

drivers/built-in.o(.data+0xba34): undefined reference to `local symbols in discarded section .text.exit'

The following patch seems to fix the problem:

--- drivers/net/tulip/dmfe.c	Thu Jun 20 15:53:56 2002
+++ drivers/net/tulip/dmfe.c.new	Tue Jun 25 20:50:57 2002
@@ -461,7 +461,7 @@
 }
 
 
-static void __exit dmfe_remove_one (struct pci_dev *pdev)
+static void __devexit dmfe_remove_one (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct dmfe_board_info *db = dev->priv;


I'm not (usually) a kernel hacker; I'm just mimicking what others are doing
to fix similar errors.  However, it is working for me right now.

--Paul Vojta, vojta@math.berkeley.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix .text.exit error in dmfe.c
  2002-06-26  4:18 [patch] fix .text.exit error in dmfe.c Paul Vojta
@ 2002-06-26  9:22 ` Adrian Bunk
  2002-06-26 17:43   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2002-06-26  9:22 UTC (permalink / raw)
  To: Paul Vojta; +Cc: linux-kernel

On Tue, 25 Jun 2002, Paul Vojta wrote:

> Folks:
>
> When I compile dmfe.o statically into the 2.5.24 kernel, I get:
>
> drivers/built-in.o(.data+0xba34): undefined reference to `local symbols in discarded section .text.exit'
>
> The following patch seems to fix the problem:
>
> --- drivers/net/tulip/dmfe.c	Thu Jun 20 15:53:56 2002
> +++ drivers/net/tulip/dmfe.c.new	Tue Jun 25 20:50:57 2002
> @@ -461,7 +461,7 @@
>  }
>
>
> -static void __exit dmfe_remove_one (struct pci_dev *pdev)
> +static void __devexit dmfe_remove_one (struct pci_dev *pdev)
>  {
>  	struct net_device *dev = pci_get_drvdata(pdev);
>  	struct dmfe_board_info *db = dev->priv;
>
>
> I'm not (usually) a kernel hacker; I'm just mimicking what others are doing
> to fix similar errors.  However, it is working for me right now.


Your patch works, but as long as tulip hasn't become a hotpluggable driver
the following patch (that also fixes a similar .text.exit error in
de2104x.c)  should be more correct:


--- drivers/net/tulip/de2104x.c.old	Sun May 12 13:55:28 2002
+++ drivers/net/tulip/de2104x.c	Sun May 12 13:56:09 2002
@@ -2216,7 +2216,9 @@
 	name:		DRV_NAME,
 	id_table:	de_pci_tbl,
 	probe:		de_init_one,
+#ifdef MODULE
 	remove:		de_remove_one,
+#endif
 #ifdef CONFIG_PM
 	suspend:	de_suspend,
 	resume:		de_resume,
--- drivers/net/tulip/dmfe.c.old	Sun May 12 13:47:59 2002
+++ drivers/net/tulip/dmfe.c	Sun May 12 13:54:54 2002
@@ -1986,7 +1986,9 @@
 	name:		"dmfe",
 	id_table:	dmfe_pci_tbl,
 	probe:		dmfe_init_one,
-	remove:		__devexit_p(dmfe_remove_one),
+#ifdef MODULE
+	remove:		dmfe_remove_one,
+#endif
 };

 MODULE_AUTHOR("Sten Wang, sten_wang@davicom.com.tw");


> --Paul Vojta, vojta@math.berkeley.edu

cu
Adrian

-- 

You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
								Alan Cox


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix .text.exit error in dmfe.c
  2002-06-26  9:22 ` Adrian Bunk
@ 2002-06-26 17:43   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2002-06-26 17:43 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Paul Vojta, linux-kernel

On Wed, Jun 26, 2002 at 11:22:33AM +0200, Adrian Bunk wrote:
> 
> Your patch works, but as long as tulip hasn't become a hotpluggable driver
> the following patch (that also fixes a similar .text.exit error in
> de2104x.c)  should be more correct:

All pci drivers that use the pci_module_init() are now hotpluggable, due
to PCI Hotplug systems :)

The devexit_p combined with __devexit solution seems to be the preferred
way to handle this problem.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-06-26 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-26  4:18 [patch] fix .text.exit error in dmfe.c Paul Vojta
2002-06-26  9:22 ` Adrian Bunk
2002-06-26 17:43   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox