Commit 1d4a5b61 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI / hotplug / PCI: Use acpi_handle_debug() in hotplug_event()

Make hotplug_event() use acpi_handle_debug() instead of an open-coded
debug message printing and clean up the messages printed by it.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent b75cece1
...@@ -819,9 +819,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data) ...@@ -819,9 +819,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
struct acpiphp_func *func = &context->func; struct acpiphp_func *func = &context->func;
struct acpiphp_slot *slot = func->slot; struct acpiphp_slot *slot = func->slot;
struct acpiphp_bridge *bridge; struct acpiphp_bridge *bridge;
char objname[64];
struct acpi_buffer buffer = { .length = sizeof(objname),
.pointer = objname };
mutex_lock(&acpiphp_context_lock); mutex_lock(&acpiphp_context_lock);
bridge = context->bridge; bridge = context->bridge;
...@@ -831,14 +828,11 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data) ...@@ -831,14 +828,11 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
mutex_unlock(&acpiphp_context_lock); mutex_unlock(&acpiphp_context_lock);
pci_lock_rescan_remove(); pci_lock_rescan_remove();
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
switch (type) { switch (type) {
case ACPI_NOTIFY_BUS_CHECK: case ACPI_NOTIFY_BUS_CHECK:
/* bus re-enumerate */ /* bus re-enumerate */
pr_debug("%s: Bus check notify on %s\n", __func__, objname); acpi_handle_debug(handle, "Bus check in %s()\n", __func__);
pr_debug("%s: re-enumerating slots under %s\n",
__func__, objname);
if (bridge) if (bridge)
acpiphp_check_bridge(bridge); acpiphp_check_bridge(bridge);
else if (!(slot->flags & SLOT_IS_GOING_AWAY)) else if (!(slot->flags & SLOT_IS_GOING_AWAY))
...@@ -848,7 +842,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data) ...@@ -848,7 +842,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
case ACPI_NOTIFY_DEVICE_CHECK: case ACPI_NOTIFY_DEVICE_CHECK:
/* device check */ /* device check */
pr_debug("%s: Device check notify on %s\n", __func__, objname); acpi_handle_debug(handle, "Device check in %s()\n", __func__);
if (bridge) { if (bridge) {
acpiphp_check_bridge(bridge); acpiphp_check_bridge(bridge);
} else if (!(slot->flags & SLOT_IS_GOING_AWAY)) { } else if (!(slot->flags & SLOT_IS_GOING_AWAY)) {
...@@ -863,7 +857,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data) ...@@ -863,7 +857,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
case ACPI_NOTIFY_EJECT_REQUEST: case ACPI_NOTIFY_EJECT_REQUEST:
/* request device eject */ /* request device eject */
pr_debug("%s: Device eject notify on %s\n", __func__, objname); acpi_handle_debug(handle, "Eject request in %s()\n", __func__);
acpiphp_disable_and_eject_slot(slot); acpiphp_disable_and_eject_slot(slot);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment