Commit 6037a803 authored by Jiang Liu's avatar Jiang Liu Committed by Bjorn Helgaas

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: default avatarJiang Liu <jiang.liu@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 5c0b04e3
...@@ -52,15 +52,12 @@ config HOTPLUG_PCI_IBM ...@@ -52,15 +52,12 @@ config HOTPLUG_PCI_IBM
When in doubt, say N. When in doubt, say N.
config HOTPLUG_PCI_ACPI config HOTPLUG_PCI_ACPI
tristate "ACPI PCI Hotplug driver" bool "ACPI PCI Hotplug driver"
depends on (!ACPI_DOCK && ACPI) || (ACPI_DOCK) depends on HOTPLUG_PCI=y && ((!ACPI_DOCK && ACPI) || (ACPI_DOCK))
help help
Say Y here if you have a system that supports PCI Hotplug using Say Y here if you have a system that supports PCI Hotplug using
ACPI. ACPI.
To compile this driver as a module, choose M here: the
module will be called acpiphp.
When in doubt, say N. When in doubt, say N.
config HOTPLUG_PCI_ACPI_IBM config HOTPLUG_PCI_ACPI_IBM
......
...@@ -190,5 +190,6 @@ extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot); ...@@ -190,5 +190,6 @@ extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);
/* variables */ /* variables */
extern bool acpiphp_debug; extern bool acpiphp_debug;
extern bool acpiphp_disabled;
#endif /* _ACPIPHP_H */ #endif /* _ACPIPHP_H */
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#define SLOT_NAME_SIZE 21 /* {_SUN} */ #define SLOT_NAME_SIZE 21 /* {_SUN} */
bool acpiphp_debug; bool acpiphp_debug;
bool acpiphp_disabled;
/* local variables */ /* local variables */
static struct acpiphp_attention_info *attention_info; static struct acpiphp_attention_info *attention_info;
...@@ -60,7 +61,9 @@ MODULE_AUTHOR(DRIVER_AUTHOR); ...@@ -60,7 +61,9 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); 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(debug, acpiphp_debug, bool, 0644);
module_param_named(disable, acpiphp_disabled, bool, 0444);
/* export the attention callback registration methods */ /* export the attention callback registration methods */
EXPORT_SYMBOL_GPL(acpiphp_register_attention); EXPORT_SYMBOL_GPL(acpiphp_register_attention);
...@@ -353,9 +356,11 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *acpiphp_slot) ...@@ -353,9 +356,11 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
static int __init acpiphp_init(void) 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; return 0;
/* read all the ACPI info from the system */ /* read all the ACPI info from the system */
...@@ -364,14 +369,4 @@ static int __init acpiphp_init(void) ...@@ -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_init(acpiphp_init);
module_exit(acpiphp_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment