summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorTang Chen <tangchen@cn.fujitsu.com>2013-01-21 13:20:49 -0800
committerBjorn Helgaas <bhelgaas@google.com>2013-01-25 14:51:47 -0700
commit121b090e7d4063b65f40c267ef0fb34fb278dfdf (patch)
tree3e2d276c97141256afb99cea2519edc1c4d678a5 /drivers/acpi
parent668192b678201d2fff27c6cc76bb003c1ec4a52a (diff)
downloadop-kernel-dev-121b090e7d4063b65f40c267ef0fb34fb278dfdf.zip
op-kernel-dev-121b090e7d4063b65f40c267ef0fb34fb278dfdf.tar.gz
PCI/ACPI: Print info if host bridge notify handler installation fails
acpi_install_notify_handler() could fail. So check the exit status and give a better debug info. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_root.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 1389811a..fd59f57 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -769,6 +769,7 @@ static void handle_hotplug_event_root(acpi_handle handle, u32 type,
static acpi_status __init
find_root_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
{
+ acpi_status status;
char objname[64];
struct acpi_buffer buffer = { .length = sizeof(objname),
.pointer = objname };
@@ -781,9 +782,14 @@ find_root_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
- acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
- handle_hotplug_event_root, NULL);
- printk(KERN_DEBUG "acpi root: %s notify handler installed\n", objname);
+ status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
+ handle_hotplug_event_root, NULL);
+ if (ACPI_FAILURE(status))
+ printk(KERN_DEBUG "acpi root: %s notify handler is not installed, exit status: %u\n",
+ objname, (unsigned int)status);
+ else
+ printk(KERN_DEBUG "acpi root: %s notify handler is installed\n",
+ objname);
return AE_OK;
}
OpenPOWER on IntegriCloud