summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_link.c6
-rw-r--r--drivers/acpi/processor_perflib.c10
-rw-r--r--drivers/acpi/processor_throttling.c16
-rw-r--r--drivers/acpi/sysfs.c12
-rw-r--r--drivers/acpi/utils.c14
5 files changed, 24 insertions, 34 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index b9b80e26cb5c..cb7b900d9466 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -256,8 +256,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
status = acpi_walk_resources(handle, METHOD_NAME__CRS,
acpi_pci_link_check_current, &irq);
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(handle, "_CRS evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(handle, "_CRS", status);
result = -ENODEV;
goto end;
}
@@ -345,8 +344,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
/* check for total failure */
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(handle, "_SRS evaluation failed: %s",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(handle, "_SRS", status);
result = -ENODEV;
goto end;
}
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 686b23fb968c..1b6aa635bff6 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -67,9 +67,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
acpi_processor_ppc_in_use = true;
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(pr->handle,
- "_PPC evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_PPC", status);
return -ENODEV;
}
}
@@ -199,8 +197,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(pr->handle, "_PCT evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_PCT", status);
return -ENODEV;
}
@@ -300,8 +297,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(pr->handle, "_PSS evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_PSS", status);
return -ENODEV;
}
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index fb6834cb0882..e61b8f038364 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -281,9 +281,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc);
if (ACPI_FAILURE(status)) {
if (status != AE_NOT_FOUND)
- acpi_handle_warn(pr->handle,
- "_TPC evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_TPC", status);
return -ENODEV;
}
@@ -416,9 +414,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer);
if (ACPI_FAILURE(status)) {
if (status != AE_NOT_FOUND)
- acpi_handle_warn(pr->handle,
- "_PTC evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_PTC", status);
return -ENODEV;
}
@@ -503,9 +499,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
status = acpi_evaluate_object(pr->handle, "_TSS", NULL, &buffer);
if (ACPI_FAILURE(status)) {
if (status != AE_NOT_FOUND)
- acpi_handle_warn(pr->handle,
- "_TSS evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_TSS", status);
return -ENODEV;
}
@@ -586,9 +580,7 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
status = acpi_evaluate_object(pr->handle, "_TSD", NULL, &buffer);
if (ACPI_FAILURE(status)) {
if (status != AE_NOT_FOUND)
- acpi_handle_warn(pr->handle,
- "_TSD evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_TSD", status);
return -ENODEV;
}
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index 4f27d7820784..d25927195d6d 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -12,9 +12,6 @@
#include "internal.h"
-#define _COMPONENT ACPI_SYSTEM_COMPONENT
-ACPI_MODULE_NAME("sysfs");
-
#ifdef CONFIG_ACPI_DEBUG
/*
* ACPI debug sysfs I/F, including:
@@ -51,12 +48,6 @@ static const struct acpi_dlayer acpi_debug_layers[] = {
ACPI_DEBUG_INIT(ACPI_CA_DISASSEMBLER),
ACPI_DEBUG_INIT(ACPI_COMPILER),
ACPI_DEBUG_INIT(ACPI_TOOLS),
-
- ACPI_DEBUG_INIT(ACPI_SBS_COMPONENT),
- ACPI_DEBUG_INIT(ACPI_FAN_COMPONENT),
- ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT),
- ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT),
- ACPI_DEBUG_INIT(ACPI_MEMORY_DEVICE_COMPONENT),
};
static const struct acpi_dlevel acpi_debug_levels[] = {
@@ -650,8 +641,7 @@ static int get_status(u32 index, acpi_event_status *ret,
if (index < num_gpes) {
status = acpi_get_gpe_device(index, handle);
if (ACPI_FAILURE(status)) {
- ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
- "Invalid GPE 0x%x", index));
+ pr_warn("Invalid GPE 0x%x", index);
return -ENXIO;
}
status = acpi_get_gpe_status(*handle, index, ret);
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 682edd913b3b..f1aff4dab476 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -512,6 +512,20 @@ EXPORT_SYMBOL(__acpi_handle_debug);
#endif
/**
+ * acpi_evaluation_failure_warn - Log evaluation failure warning.
+ * @handle: Parent object handle.
+ * @name: Name of the object whose evaluation has failed.
+ * @status: Status value returned by the failing object evaluation.
+ */
+void acpi_evaluation_failure_warn(acpi_handle handle, const char *name,
+ acpi_status status)
+{
+ acpi_handle_warn(handle, "%s evaluation failed: %s\n", name,
+ acpi_format_exception(status));
+}
+EXPORT_SYMBOL_GPL(acpi_evaluation_failure_warn);
+
+/**
* acpi_has_method: Check whether @handle has a method named @name
* @handle: ACPI device handle
* @name: name of object or method