summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/acpiphp_core.c
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-04-12 09:44:25 +0400
committerBjorn Helgaas <bhelgaas@google.com>2013-04-13 01:38:25 +0400
commit6037a803b05eef9943fb64982e19964007fb7478 (patch)
tree3e15b1dfef971b65175c665f97d3ea70507423a8 /drivers/pci/hotplug/acpiphp_core.c
parent5c0b04e3d913c91aee6e48e567e20a3f67849618 (diff)
downloadlinux-6037a803b05eef9943fb64982e19964007fb7478.tar.xz
PCI: acpiphp: Convert acpiphp to be builtin only, not modular
Convert acpiphp to be builtin only, with no module option. Previously, when HOTPLUG_PCI_ACPI=m, users could disable acpiphp by removing the module or preventing it from loading. That can't be done if acpiphp is builtin statically, so this adds an "acpiphp.disable" kernel parameter. If a user needs to use this parameter, it is a bug, and we want to hear about it. [bhelgaas: fold in acpiphp.disable here, remove documentation] Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_core.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_core.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
index c2fd3095701f..81adbfa4df1b 100644
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -48,6 +48,7 @@
#define SLOT_NAME_SIZE 21 /* {_SUN} */
bool acpiphp_debug;
+bool acpiphp_disabled;
/* local variables */
static struct acpiphp_attention_info *attention_info;
@@ -60,7 +61,9 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
+MODULE_PARM_DESC(disable, "disable acpiphp driver");
module_param_named(debug, acpiphp_debug, bool, 0644);
+module_param_named(disable, acpiphp_disabled, bool, 0444);
/* export the attention callback registration methods */
EXPORT_SYMBOL_GPL(acpiphp_register_attention);
@@ -353,9 +356,11 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
static int __init acpiphp_init(void)
{
- info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
+ info(DRIVER_DESC " version: " DRIVER_VERSION "%s\n",
+ acpiphp_disabled ? ", disabled by user; please report a bug"
+ : "");
- if (acpi_pci_disabled)
+ if (acpi_pci_disabled || acpiphp_disabled)
return 0;
/* read all the ACPI info from the system */
@@ -364,14 +369,4 @@ static int __init acpiphp_init(void)
}
-static void __exit acpiphp_exit(void)
-{
- if (acpi_pci_disabled)
- return;
-
- /* deallocate internal data structures etc. */
- acpiphp_glue_exit();
-}
-
module_init(acpiphp_init);
-module_exit(acpiphp_exit);