All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>, Len Brown <len.brown@intel.com>
Subject: [PATCH 22/25] PNP: remove MODULE infrastructure
Date: Fri, 24 Aug 2007 03:21:09 -0400	[thread overview]
Message-ID: <11879400984017-git-send-email-len.brown@intel.com> (raw)
Message-ID: <4f0217e30249ac0eb13b65ef64f2aee627465da2.1187939443.git.len.brown@intel.com> (raw)
In-Reply-To: <11879400972603-git-send-email-len.brown@intel.com>
In-Reply-To: <3c1d36da1d5ed36979340efd233ddaacc45b0a02.1187939442.git.len.brown@intel.com>

From: Bjorn Helgaas <bjorn.helgaas@hp.com>

We don't support building any part of PNP as a module (*drivers* can be
modules, of course, but the PNP infrastructure itself can not).  Since
MODULE will never be defined, remove the ifdefs and dead code.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/pnp/isapnp/proc.c  |   45 --------------------------------------------
 drivers/pnp/pnpbios/core.c |   43 ------------------------------------------
 2 files changed, 0 insertions(+), 88 deletions(-)

diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index 3fbc0f9..560ccb6 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -112,33 +112,6 @@ static int isapnp_proc_attach_device(struct pnp_dev *dev)
 	return 0;
 }
 
-#ifdef MODULE
-static int __exit isapnp_proc_detach_device(struct pnp_dev *dev)
-{
-	struct pnp_card *bus = dev->card;
-	struct proc_dir_entry *de;
-	char name[16];
-
-	if (!(de = bus->procdir))
-		return -EINVAL;
-	sprintf(name, "%02x", dev->number);
-	remove_proc_entry(name, de);
-	return 0;
-}
-
-static int __exit isapnp_proc_detach_bus(struct pnp_card *bus)
-{
-	struct proc_dir_entry *de;
-	char name[16];
-
-	if (!(de = bus->procdir))
-		return -EINVAL;
-	sprintf(name, "%02x", bus->number);
-	remove_proc_entry(name, isapnp_proc_bus_dir);
-	return 0;
-}
-#endif				/* MODULE */
-
 int __init isapnp_proc_init(void)
 {
 	struct pnp_dev *dev;
@@ -149,21 +122,3 @@ int __init isapnp_proc_init(void)
 	}
 	return 0;
 }
-
-#ifdef MODULE
-int __exit isapnp_proc_done(void)
-{
-	struct pnp_dev *dev;
-	struct pnp_bus *card;
-
-	isapnp_for_each_dev(dev) {
-		isapnp_proc_detach_device(dev);
-	}
-	isapnp_for_each_card(card) {
-		isapnp_proc_detach_bus(card);
-	}
-	if (isapnp_proc_bus_dir)
-		remove_proc_entry("isapnp", proc_bus);
-	return 0;
-}
-#endif				/* MODULE */
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 9892a6a..0691f47 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -419,7 +419,6 @@ static void __init build_devlist(void)
 static int pnpbios_disabled;
 int pnpbios_dont_use_current_config;
 
-#ifndef MODULE
 static int __init pnpbios_setup(char *str)
 {
 	int invert;
@@ -443,7 +442,6 @@ static int __init pnpbios_setup(char *str)
 }
 
 __setup("pnpbios=", pnpbios_setup);
-#endif
 
 /* PnP BIOS signature: "$PnP" */
 #define PNP_SIGNATURE   (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24))
@@ -607,48 +605,7 @@ static int __init pnpbios_thread_init(void)
 	return 0;
 }
 
-#ifndef MODULE
-
-/* init/main.c calls pnpbios_init early */
-
 /* Start the kernel thread later: */
 module_init(pnpbios_thread_init);
 
-#else
-
-/*
- * N.B.: Building pnpbios as a module hasn't been fully implemented
- */
-
-MODULE_LICENSE("GPL");
-
-static int __init pnpbios_init_all(void)
-{
-	int r;
-
-	r = pnpbios_init();
-	if (r)
-		return r;
-	r = pnpbios_thread_init();
-	if (r)
-		return r;
-	return 0;
-}
-
-static void __exit pnpbios_exit(void)
-{
-#ifdef CONFIG_HOTPLUG
-	unloading = 1;
-	wait_for_completion(&unload_sem);
-#endif
-	pnpbios_proc_exit();
-	/* We ought to free resources here */
-	return;
-}
-
-module_init(pnpbios_init_all);
-module_exit(pnpbios_exit);
-
-#endif
-
 EXPORT_SYMBOL(pnpbios_protocol);
-- 
1.5.3.rc6.17.g1911

  parent reply	other threads:[~2007-08-24  7:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-24  7:20 ACPI patches for Linux-2.6.23-rc3 Len Brown
2007-08-24  7:20 ` [PATCH 01/25] ACPI: thermal: clean up MODULE_PARM_DESC newlines Len Brown
2007-08-24  7:20   ` Len Brown
2007-08-24  7:20   ` [PATCH 02/25] ACPI: thermal: create "thermal.crt=C" bootparam Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 03/25] Revert "ACPI: Battery: Synchronize battery operations." Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 04/25] ACPI: thermal: set "thermal.nocrt" via DMI on Gigabyte GA-7ZX Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 05/25] ACPI: boot correctly with "nosmp" or "maxcpus=0" Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 06/25] Subject: "ACPI handle has no context!" should be KERN_DEBUG Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 08/25] ACPI: Schedule /proc/acpi/event for removal Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 09/25] ACPI: Fix a warning of discarding qualifiers from pointer target type Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 10/25] ACPI: video: Add keycode for ACPI video driver hotkey events Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 11/25] ACPI video hotkey: remove invalid events handler for video output devices Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:20   ` [PATCH 12/25] ACPI video hotkey: export ACPI video hotkey events via input layer Len Brown
2007-08-24  7:20     ` Len Brown
2007-08-24  7:21   ` [PATCH 13/25] ACPI: EC: revert fix for bugzilla 8709 Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 14/25] sony-laptop: enable Vaio FZ events Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 15/25] sony-laptop: call sonypi_compat_init earlier Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 16/25] asus-laptop: Fix rmmod of asus_laptop Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 17/25] ACPI: enable GPEs before calling _WAK on resume Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 18/25] PNP: fix up after Lindent Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 19/25] PNPACPI: simplify irq_flags() Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 20/25] PNPACPI: remove unnecessary casts of "void *" Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 21/25] ISAPNP: removed unused isapnp_detected and ISAPNP_DEBUG Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` Len Brown [this message]
2007-08-24  7:21     ` [PATCH 22/25] PNP: remove MODULE infrastructure Len Brown
2007-08-24  7:21   ` [PATCH 23/25] PNP: remove null pointer checks Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 24/25] make drivers/acpi/scan.c:create_modalias() static Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  7:21   ` [PATCH 25/25] ACPI: fix ia64 allnoconfig build Len Brown
2007-08-24  7:21     ` Len Brown
2007-08-24  8:07 ` ACPI patches for Linux-2.6.23-rc3 Zhang Rui
2007-08-24 23:37   ` Len Brown
2007-08-25  5:26     ` Zhang Rui

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=11879400984017-git-send-email-len.brown@intel.com \
    --to=len.brown@intel.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-acpi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.