public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]take2 2.4.18-pre1 sound/trident fix with newer binutils
@ 2002-01-02 14:06 Albert Cranford
  2002-01-02 19:36 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Albert Cranford @ 2002-01-02 14:06 UTC (permalink / raw)
  To: ollie, linux-kernel, Keith Owens

Take 2.  Mistake in previous patch.  Sorry.
Hello Ollie,
Small problem.
I cannot build kernel with binutils-2.11.92.0.12.3

Using ARCH='i386' AS='as' LD='ld' CC='/usr/bin/gcc' CPP='/usr/bin/gcc -E' AR='ar' HOSTAS='as' HOSTLD='gcc' HOSTCC='gcc' HOSTAR='ar'
drivers/sound/trident.o(.data+0x154): undefined reference to `local symbols in discarded section .text.exit'

Please submit the attached patch to Marcelo and Linus
for 2.4 and 2.5 respectfully.  This patch also works
with older binutils-2.11.2
Thanks,
Albert
--- trident.c.orig      Wed Jan  2 06:36:12 2002
+++ trident.c   Wed Jan  2 08:59:09 2002
@@ -4141,7 +4141,7 @@
        goto out;
 }
 
-static void __exit trident_remove(struct pci_dev *pci_dev)
+static void __devexit trident_remove(struct pci_dev *pci_dev)
 {
        int i;
        struct trident_card *card = pci_get_drvdata(pci_dev);
@@ -4194,7 +4194,7 @@
        name:           TRIDENT_MODULE_NAME,
        id_table:       trident_pci_tbl,
        probe:          trident_probe,
-       remove:         trident_remove,
+       remove:         __devexit_p(trident_remove),
        suspend:        trident_suspend,
        resume:         trident_resume
 };
@@ -4214,7 +4214,7 @@
        return 0;
 }
 
-static void __exit trident_cleanup_module (void)
+static void __devexit trident_cleanup_module (void)
 {
        pci_unregister_driver(&trident_pci_driver);
 }
-- 
Albert Cranford Deerfield Beach FL USA
ac9410@bellsouth.net


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

* Re: [PATCH]take2 2.4.18-pre1 sound/trident fix with newer binutils
  2002-01-02 14:06 [PATCH]take2 2.4.18-pre1 sound/trident fix with newer binutils Albert Cranford
@ 2002-01-02 19:36 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2002-01-02 19:36 UTC (permalink / raw)
  To: Albert Cranford; +Cc: ollie, linux-kernel, Keith Owens, Marcelo Tosatti

Albert Cranford wrote:
> -static void __exit trident_cleanup_module (void)
> +static void __devexit trident_cleanup_module (void)
>  {
>         pci_unregister_driver(&trident_pci_driver);
>  }

cleanup_module (module_exit) never ever has a reason to be __devexit. 
It is run once at module exit, regardless of CONFIG_HOTPLUG.  If !MODULE
the function is dropped, that's the only requirement.

-- 
Jeff Garzik      | Only so many songs can be sung
Building 1024    | with two lips, two lungs, and one tongue.
MandrakeSoft     |         - nomeansno

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

end of thread, other threads:[~2002-01-02 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-02 14:06 [PATCH]take2 2.4.18-pre1 sound/trident fix with newer binutils Albert Cranford
2002-01-02 19:36 ` Jeff Garzik

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