aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_core.c
diff options
context:
space:
mode:
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 @@
48#define SLOT_NAME_SIZE 21 /* {_SUN} */ 48#define SLOT_NAME_SIZE 21 /* {_SUN} */
49 49
50bool acpiphp_debug; 50bool acpiphp_debug;
51bool acpiphp_disabled;
51 52
52/* local variables */ 53/* local variables */
53static struct acpiphp_attention_info *attention_info; 54static struct acpiphp_attention_info *attention_info;
@@ -60,7 +61,9 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
60MODULE_DESCRIPTION(DRIVER_DESC); 61MODULE_DESCRIPTION(DRIVER_DESC);
61MODULE_LICENSE("GPL"); 62MODULE_LICENSE("GPL");
62MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); 63MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
64MODULE_PARM_DESC(disable, "disable acpiphp driver");
63module_param_named(debug, acpiphp_debug, bool, 0644); 65module_param_named(debug, acpiphp_debug, bool, 0644);
66module_param_named(disable, acpiphp_disabled, bool, 0444);
64 67
65/* export the attention callback registration methods */ 68/* export the attention callback registration methods */
66EXPORT_SYMBOL_GPL(acpiphp_register_attention); 69EXPORT_SYMBOL_GPL(acpiphp_register_attention);
@@ -353,9 +356,11 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
353 356
354static int __init acpiphp_init(void) 357static int __init acpiphp_init(void)
355{ 358{
356 info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); 359 info(DRIVER_DESC " version: " DRIVER_VERSION "%s\n",
360 acpiphp_disabled ? ", disabled by user; please report a bug"
361 : "");
357 362
358 if (acpi_pci_disabled) 363 if (acpi_pci_disabled || acpiphp_disabled)
359 return 0; 364 return 0;
360 365
361 /* read all the ACPI info from the system */ 366 /* read all the ACPI info from the system */
@@ -364,14 +369,4 @@ static int __init acpiphp_init(void)
364} 369}
365 370
366 371
367static void __exit acpiphp_exit(void)
368{
369 if (acpi_pci_disabled)
370 return;
371
372 /* deallocate internal data structures etc. */
373 acpiphp_glue_exit();
374}
375
376module_init(acpiphp_init); 372module_init(acpiphp_init);
377module_exit(acpiphp_exit);