aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-03 18:41:52 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-05 11:41:08 -0500
commit1d4a5b610e500fe860570db4ceb64e45255221ab (patch)
tree0c2614f6d350a48c7bf925efc81fe0c98d28af21
parentb75cece1a79a6259185442004e040511ed3a7341 (diff)
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index d00da68752ea..64ad6eed983f 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -819,9 +819,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
819 struct acpiphp_func *func = &context->func; 819 struct acpiphp_func *func = &context->func;
820 struct acpiphp_slot *slot = func->slot; 820 struct acpiphp_slot *slot = func->slot;
821 struct acpiphp_bridge *bridge; 821 struct acpiphp_bridge *bridge;
822 char objname[64];
823 struct acpi_buffer buffer = { .length = sizeof(objname),
824 .pointer = objname };
825 822
826 mutex_lock(&acpiphp_context_lock); 823 mutex_lock(&acpiphp_context_lock);
827 bridge = context->bridge; 824 bridge = context->bridge;
@@ -831,14 +828,11 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
831 mutex_unlock(&acpiphp_context_lock); 828 mutex_unlock(&acpiphp_context_lock);
832 829
833 pci_lock_rescan_remove(); 830 pci_lock_rescan_remove();
834 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
835 831
836 switch (type) { 832 switch (type) {
837 case ACPI_NOTIFY_BUS_CHECK: 833 case ACPI_NOTIFY_BUS_CHECK:
838 /* bus re-enumerate */ 834 /* bus re-enumerate */
839 pr_debug("%s: Bus check notify on %s\n", __func__, objname); 835 acpi_handle_debug(handle, "Bus check in %s()\n", __func__);
840 pr_debug("%s: re-enumerating slots under %s\n",
841 __func__, objname);
842 if (bridge) 836 if (bridge)
843 acpiphp_check_bridge(bridge); 837 acpiphp_check_bridge(bridge);
844 else if (!(slot->flags & SLOT_IS_GOING_AWAY)) 838 else if (!(slot->flags & SLOT_IS_GOING_AWAY))
@@ -848,7 +842,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
848 842
849 case ACPI_NOTIFY_DEVICE_CHECK: 843 case ACPI_NOTIFY_DEVICE_CHECK:
850 /* device check */ 844 /* device check */
851 pr_debug("%s: Device check notify on %s\n", __func__, objname); 845 acpi_handle_debug(handle, "Device check in %s()\n", __func__);
852 if (bridge) { 846 if (bridge) {
853 acpiphp_check_bridge(bridge); 847 acpiphp_check_bridge(bridge);
854 } else if (!(slot->flags & SLOT_IS_GOING_AWAY)) { 848 } else if (!(slot->flags & SLOT_IS_GOING_AWAY)) {
@@ -863,7 +857,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
863 857
864 case ACPI_NOTIFY_EJECT_REQUEST: 858 case ACPI_NOTIFY_EJECT_REQUEST:
865 /* request device eject */ 859 /* request device eject */
866 pr_debug("%s: Device eject notify on %s\n", __func__, objname); 860 acpi_handle_debug(handle, "Eject request in %s()\n", __func__);
867 acpiphp_disable_and_eject_slot(slot); 861 acpiphp_disable_and_eject_slot(slot);
868 break; 862 break;
869 } 863 }