aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug.c')
-rw-r--r--drivers/pci/hotplug.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
index 42b23049a7fcd..d471b3ea5d12f 100644
--- a/drivers/pci/hotplug.c
+++ b/drivers/pci/hotplug.c
@@ -1,15 +1,8 @@
+#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/module.h>
#include "pci.h"
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
int pci_hotplug (struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size)
{
@@ -71,7 +64,8 @@ static int pci_visit_bus (struct pci_visit * fn, struct pci_bus_wrapped *wrapped
struct pci_dev_wrapped wrapped_dev;
int result = 0;
- DBG("scanning bus %02x\n", wrapped_bus->bus->number);
+ pr_debug("PCI: Scanning bus %04x:%02x\n", pci_domain_nr(wrapped_bus->bus),
+ wrapped_bus->bus->number);
if (fn->pre_visit_pci_bus) {
result = fn->pre_visit_pci_bus(wrapped_bus, wrapped_parent);
@@ -106,8 +100,7 @@ static int pci_visit_bridge (struct pci_visit * fn,
struct pci_bus_wrapped wrapped_bus;
int result = 0;
- DBG("scanning bridge %02x, %02x\n", PCI_SLOT(wrapped_dev->dev->devfn),
- PCI_FUNC(wrapped_dev->dev->devfn));
+ pr_debug("PCI: Scanning bridge %s\n", pci_name(wrapped_dev->dev));
if (fn->visit_pci_dev) {
result = fn->visit_pci_dev(wrapped_dev, wrapped_parent);
@@ -153,8 +146,7 @@ int pci_visit_dev(struct pci_visit *fn, struct pci_dev_wrapped *wrapped_dev,
return result;
break;
default:
- DBG("scanning device %02x, %02x\n",
- PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
+ pr_debug("PCI: Scanning device %s\n", pci_name(dev));
if (fn->visit_pci_dev) {
result = fn->visit_pci_dev (wrapped_dev,
wrapped_parent);
@@ -169,4 +161,3 @@ int pci_visit_dev(struct pci_visit *fn, struct pci_dev_wrapped *wrapped_dev,
return result;
}
EXPORT_SYMBOL(pci_visit_dev);
-