diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2006-05-10 09:20:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-19 17:13:22 -0400 |
commit | aad20cabaa3d6dfa1e0ebc8fb0537a96d3518b8f (patch) | |
tree | 75f8e44cd25fe5ce7851815224f775b15cf9c8b3 /drivers/pci/hotplug/acpi_pcihp.c | |
parent | 7430e34c70106a9576fc61d77604d164b187a1b7 (diff) |
[PATCH] acpi_pcihp: Remove improper error message about OSHP
This patch converts the improper error message about OSHP evaluation
to debug message which is displayed only when pci_hotplug.ko is loaded
with debugging mode enabled. To do this, this patch adds a new module
parameter "debug_acpi" to pci_hotplug.ko for enabling/disabling debug
messages in acpi_pcihp.c.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Kristen Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/acpi_pcihp.c')
-rw-r--r-- | drivers/pci/hotplug/acpi_pcihp.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 9395fec73423..afac5c37325b 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/moduleparam.h> | ||
28 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
@@ -33,10 +34,19 @@ | |||
33 | #include <acpi/actypes.h> | 34 | #include <acpi/actypes.h> |
34 | #include "pci_hotplug.h" | 35 | #include "pci_hotplug.h" |
35 | 36 | ||
37 | #define MY_NAME "acpi_pcihp" | ||
38 | |||
39 | #define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0) | ||
40 | #define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg) | ||
41 | #define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg) | ||
42 | #define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg) | ||
43 | |||
36 | #define METHOD_NAME__SUN "_SUN" | 44 | #define METHOD_NAME__SUN "_SUN" |
37 | #define METHOD_NAME__HPP "_HPP" | 45 | #define METHOD_NAME__HPP "_HPP" |
38 | #define METHOD_NAME_OSHP "OSHP" | 46 | #define METHOD_NAME_OSHP "OSHP" |
39 | 47 | ||
48 | static int debug_acpi; | ||
49 | |||
40 | 50 | ||
41 | static acpi_status | 51 | static acpi_status |
42 | acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) | 52 | acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) |
@@ -130,8 +140,12 @@ acpi_status acpi_run_oshp(acpi_handle handle) | |||
130 | /* run OSHP */ | 140 | /* run OSHP */ |
131 | status = acpi_evaluate_object(handle, METHOD_NAME_OSHP, NULL, NULL); | 141 | status = acpi_evaluate_object(handle, METHOD_NAME_OSHP, NULL, NULL); |
132 | if (ACPI_FAILURE(status)) | 142 | if (ACPI_FAILURE(status)) |
133 | printk(KERN_ERR "%s:%s OSHP fails=0x%x\n", __FUNCTION__, | 143 | if (status != AE_NOT_FOUND) |
134 | (char *)string.pointer, status); | 144 | printk(KERN_ERR "%s:%s OSHP fails=0x%x\n", |
145 | __FUNCTION__, (char *)string.pointer, status); | ||
146 | else | ||
147 | dbg("%s:%s OSHP not found\n", | ||
148 | __FUNCTION__, (char *)string.pointer); | ||
135 | else | 149 | else |
136 | pr_debug("%s:%s OSHP passes\n", __FUNCTION__, | 150 | pr_debug("%s:%s OSHP passes\n", __FUNCTION__, |
137 | (char *)string.pointer); | 151 | (char *)string.pointer); |
@@ -223,3 +237,6 @@ int acpi_root_bridge(acpi_handle handle) | |||
223 | return 0; | 237 | return 0; |
224 | } | 238 | } |
225 | EXPORT_SYMBOL_GPL(acpi_root_bridge); | 239 | EXPORT_SYMBOL_GPL(acpi_root_bridge); |
240 | |||
241 | module_param(debug_acpi, bool, 0644); | ||
242 | MODULE_PARM_DESC(debug_acpi, "Debugging mode for ACPI enabled or not"); | ||