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>, pc300@cyclades.com
Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com,
	linux-net@vger.kernel.org
Subject: [2.4 patch] pc300_drv.c: mark a function pointer as __devexit_p
Date: Sun, 25 Jan 2004 01:55:23 +0100	[thread overview]
Message-ID: <20040125005523.GF6441@fs.tum.de> (raw)

I got the following link error in 2.4.25-pre7 when trying to compile 
drivers/net/wan/pc300_drv.c statically into a kernel with 
CONFIG_HOTPLUG=n :

<--  snip  -->

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

<--  snip  -->


The patch below fixes this issue by marking the function pointer with 
__devexit_p .

I also did the following changes to this struct:
- added indentation
- switched to C99 initializers
- removed two unneeded NULL's


Please apply
Adrian


--- linux-2.4.25-pre7-full-nohotplug/drivers/net/wan/pc300_drv.c.old	2004-01-25 01:41:56.000000000 +0100
+++ linux-2.4.25-pre7-full-nohotplug/drivers/net/wan/pc300_drv.c	2004-01-25 01:42:52.000000000 +0100
@@ -3459,12 +3459,10 @@
 }
 
 static struct pci_driver cpc_driver = {
-	name:"pc300",
-	id_table:cpc_pci_dev_id,
-	probe:cpc_init_one,
-	remove:cpc_remove_one,
-	suspend:NULL,
-	resume:NULL,
+	.name		= "pc300",
+	.id_table	= cpc_pci_dev_id,
+	.probe		= cpc_init_one,
+	.remove		= __devexit_p(cpc_remove_one),
 };
 
 static int __init cpc_init(void)

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

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040125005523.GF6441@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=pc300@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