diff options
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_core.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_core.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c index c2fd3095701f..ca8127950fcd 100644 --- a/drivers/pci/hotplug/acpiphp_core.c +++ b/drivers/pci/hotplug/acpiphp_core.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
39 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
40 | #include <linux/pci-acpi.h> | ||
40 | #include <linux/pci_hotplug.h> | 41 | #include <linux/pci_hotplug.h> |
41 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
42 | #include <linux/smp.h> | 43 | #include <linux/smp.h> |
@@ -48,6 +49,7 @@ | |||
48 | #define SLOT_NAME_SIZE 21 /* {_SUN} */ | 49 | #define SLOT_NAME_SIZE 21 /* {_SUN} */ |
49 | 50 | ||
50 | bool acpiphp_debug; | 51 | bool acpiphp_debug; |
52 | bool acpiphp_disabled; | ||
51 | 53 | ||
52 | /* local variables */ | 54 | /* local variables */ |
53 | static struct acpiphp_attention_info *attention_info; | 55 | static struct acpiphp_attention_info *attention_info; |
@@ -60,7 +62,9 @@ MODULE_AUTHOR(DRIVER_AUTHOR); | |||
60 | MODULE_DESCRIPTION(DRIVER_DESC); | 62 | MODULE_DESCRIPTION(DRIVER_DESC); |
61 | MODULE_LICENSE("GPL"); | 63 | MODULE_LICENSE("GPL"); |
62 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); | 64 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); |
65 | MODULE_PARM_DESC(disable, "disable acpiphp driver"); | ||
63 | module_param_named(debug, acpiphp_debug, bool, 0644); | 66 | module_param_named(debug, acpiphp_debug, bool, 0644); |
67 | module_param_named(disable, acpiphp_disabled, bool, 0444); | ||
64 | 68 | ||
65 | /* export the attention callback registration methods */ | 69 | /* export the attention callback registration methods */ |
66 | EXPORT_SYMBOL_GPL(acpiphp_register_attention); | 70 | EXPORT_SYMBOL_GPL(acpiphp_register_attention); |
@@ -351,27 +355,9 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *acpiphp_slot) | |||
351 | } | 355 | } |
352 | 356 | ||
353 | 357 | ||
354 | static int __init acpiphp_init(void) | 358 | void __init acpiphp_init(void) |
355 | { | 359 | { |
356 | info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); | 360 | info(DRIVER_DESC " version: " DRIVER_VERSION "%s\n", |
357 | 361 | acpiphp_disabled ? ", disabled by user; please report a bug" | |
358 | if (acpi_pci_disabled) | 362 | : ""); |
359 | return 0; | ||
360 | |||
361 | /* read all the ACPI info from the system */ | ||
362 | /* initialize internal data structure etc. */ | ||
363 | return acpiphp_glue_init(); | ||
364 | } | ||
365 | |||
366 | |||
367 | static 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 | } | 363 | } |
375 | |||
376 | module_init(acpiphp_init); | ||
377 | module_exit(acpiphp_exit); | ||