mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [BK PATCH] add __exit_p to complement __devexit_p
Date: Wed, 04 Dec 2002 19:34:52 -0500	[thread overview]
Message-ID: <3DEE9F2C.5090607@pobox.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 58 bytes --]

Full GNU patch attached after description for easy review

[-- Attachment #2: exitp-2.5.txt --]
[-- Type: text/plain, Size: 610 bytes --]

Linus, please do a

	bk pull bk://kernel.bkbits.net/jgarzik/exitp-2.5

This will update the following files:

 drivers/net/tulip/de2104x.c |    3 +--
 include/linux/init.h        |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

through these ChangeSets:

<wli@holomorphy.com> (02/12/02 1.797.1.172)
   Add __exit_p() to match existing __devexit_p().
   
   This patch fixes de2104x net driver up by doing the following things:
   (1) add __exit_p() to <linux/init.h>
   (2) add the unused attributed to __exit routines for non-modules
   (3) use __exit_p() to refer to de_remove_one()


[-- Attachment #3: patch --]
[-- Type: text/plain, Size: 1922 bytes --]

# --------------------------------------------
# 02/12/02	wli@holomorphy.com	1.797.1.172
# Add __exit_p() to match existing __devexit_p().
# 
# This patch fixes de2104x net driver up by doing the following things:
# (1) add __exit_p() to <linux/init.h>
# (2) add the unused attributed to __exit routines for non-modules
# (3) use __exit_p() to refer to de_remove_one()
# --------------------------------------------
#
diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
--- a/drivers/net/tulip/de2104x.c	Wed Dec  4 19:31:56 2002
+++ b/drivers/net/tulip/de2104x.c	Wed Dec  4 19:31:56 2002
@@ -2217,8 +2217,7 @@
 	.name		= DRV_NAME,
 	.id_table	= de_pci_tbl,
 	.probe		= de_init_one,
-#warning only here to fix build.  should be __exit_p not __devexit_p.
-	.remove		= __devexit_p(de_remove_one),
+	.remove		= __exit_p(de_remove_one),
 #ifdef CONFIG_PM
 	.suspend	= de_suspend,
 	.resume		= de_resume,
diff -Nru a/include/linux/init.h b/include/linux/init.h
--- a/include/linux/init.h	Wed Dec  4 19:31:56 2002
+++ b/include/linux/init.h	Wed Dec  4 19:31:56 2002
@@ -42,10 +42,15 @@
    discard it in modules) */
 #define __init		__attribute__ ((__section__ (".init.text")))
 #define __initdata	__attribute__ ((__section__ (".init.data")))
-#define __exit		__attribute__ ((__section__(".exit.text")))
 #define __exitdata	__attribute__ ((__section__(".exit.data")))
 #define __exit_call	__attribute__ ((unused,__section__ (".exitcall.exit")))
 
+#ifdef MODULE
+#define __exit		__attribute__ ((__section__(".exit.text")))
+#else
+#define __exit		__attribute__ ((unused,__section__(".exit.text")))
+#endif
+
 /* For assembly routines */
 #define __INIT		.section	".init.text","ax"
 #define __FINIT		.previous
@@ -183,6 +188,12 @@
 #define __devexit_p(x) x
 #else
 #define __devexit_p(x) NULL
+#endif
+
+#ifdef MODULE
+#define __exit_p(x) x
+#else
+#define __exit_p(x) NULL
 #endif
 
 #endif /* _LINUX_INIT_H */

                 reply	other threads:[~2002-12-05  0:27 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=3DEE9F2C.5090607@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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

Powered by JetHome