aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-11-04 12:32:52 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-04 16:06:44 -0500
commit0207c356ef0e2bae6ce4603080d42c130d7debc6 (patch)
tree504e801b50b3a0a3782f1749e72468c84e788cf7 /drivers/pci/probe.c
parent2a6bed8301f8b019717504575a3f9c6cce1fe271 (diff)
PCI: replace pr_debug with dev_dbg
Since we have a struct device, we might as well use dev_printk. Note that both pr_debug() and dev_dbg() are completely compiled out unless DEBUG or DYNAMIC_DEBUG is defined. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 4c4aca53ae09..a7fdc4344cef 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1121,7 +1121,7 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
1121 unsigned int devfn, pass, max = bus->secondary; 1121 unsigned int devfn, pass, max = bus->secondary;
1122 struct pci_dev *dev; 1122 struct pci_dev *dev;
1123 1123
1124 pr_debug("PCI: Scanning bus %04x:%02x\n", pci_domain_nr(bus), bus->number); 1124 dev_dbg(&bus->dev, "scanning bus\n");
1125 1125
1126 /* Go find them, Rover! */ 1126 /* Go find them, Rover! */
1127 for (devfn = 0; devfn < 0x100; devfn += 8) 1127 for (devfn = 0; devfn < 0x100; devfn += 8)
@@ -1135,8 +1135,7 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
1135 * all PCI-to-PCI bridges on this bus. 1135 * all PCI-to-PCI bridges on this bus.
1136 */ 1136 */
1137 if (!bus->is_added) { 1137 if (!bus->is_added) {
1138 pr_debug("PCI: Fixups for bus %04x:%02x\n", 1138 dev_dbg(&bus->dev, "fixups for bus\n");
1139 pci_domain_nr(bus), bus->number);
1140 pcibios_fixup_bus(bus); 1139 pcibios_fixup_bus(bus);
1141 if (pci_is_root_bus(bus)) 1140 if (pci_is_root_bus(bus))
1142 bus->is_added = 1; 1141 bus->is_added = 1;
@@ -1156,8 +1155,7 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
1156 * 1155 *
1157 * Return how far we've got finding sub-buses. 1156 * Return how far we've got finding sub-buses.
1158 */ 1157 */
1159 pr_debug("PCI: Bus scan for %04x:%02x returning with max=%02x\n", 1158 dev_dbg(&bus->dev, "bus scan returning with max=%02x\n", max);
1160 pci_domain_nr(bus), bus->number, max);
1161 return max; 1159 return max;
1162} 1160}
1163 1161
@@ -1165,7 +1163,7 @@ struct pci_bus * pci_create_bus(struct device *parent,
1165 int bus, struct pci_ops *ops, void *sysdata) 1163 int bus, struct pci_ops *ops, void *sysdata)
1166{ 1164{
1167 int error; 1165 int error;
1168 struct pci_bus *b; 1166 struct pci_bus *b, *b2;
1169 struct device *dev; 1167 struct device *dev;
1170 1168
1171 b = pci_alloc_bus(); 1169 b = pci_alloc_bus();
@@ -1181,9 +1179,10 @@ struct pci_bus * pci_create_bus(struct device *parent,
1181 b->sysdata = sysdata; 1179 b->sysdata = sysdata;
1182 b->ops = ops; 1180 b->ops = ops;
1183 1181
1184 if (pci_find_bus(pci_domain_nr(b), bus)) { 1182 b2 = pci_find_bus(pci_domain_nr(b), bus);
1183 if (b2) {
1185 /* If we already got to this bus through a different bridge, ignore it */ 1184 /* If we already got to this bus through a different bridge, ignore it */
1186 pr_debug("PCI: Bus %04x:%02x already known\n", pci_domain_nr(b), bus); 1185 dev_dbg(&b2->dev, "bus already known\n");
1187 goto err_out; 1186 goto err_out;
1188 } 1187 }
1189 1188