Commit 1c113a7e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] PCI: remove usages of pci slot_name from the pci core code.

parent 3444cee8
...@@ -57,7 +57,7 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp, ...@@ -57,7 +57,7 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
envp[i++] = scratch; envp[i++] = scratch;
length += snprintf (scratch, buffer_size - length, "PCI_SLOT_NAME=%s", length += snprintf (scratch, buffer_size - length, "PCI_SLOT_NAME=%s",
pdev->slot_name); pci_name(pdev));
if ((buffer_size - length <= 0) || (i >= num_envp)) if ((buffer_size - length <= 0) || (i >= num_envp))
return -ENOMEM; return -ENOMEM;
......
...@@ -506,7 +506,7 @@ int pci_request_region(struct pci_dev *pdev, int bar, char *res_name) ...@@ -506,7 +506,7 @@ int pci_request_region(struct pci_dev *pdev, int bar, char *res_name)
pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem", pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem",
bar + 1, /* PCI BAR # */ bar + 1, /* PCI BAR # */
pci_resource_len(pdev, bar), pci_resource_start(pdev, bar), pci_resource_len(pdev, bar), pci_resource_start(pdev, bar),
pdev->slot_name); pci_name(pdev));
return -EBUSY; return -EBUSY;
} }
...@@ -555,7 +555,7 @@ int pci_request_regions(struct pci_dev *pdev, char *res_name) ...@@ -555,7 +555,7 @@ int pci_request_regions(struct pci_dev *pdev, char *res_name)
pci_resource_flags(pdev, i) & IORESOURCE_IO ? "I/O" : "mem", pci_resource_flags(pdev, i) & IORESOURCE_IO ? "I/O" : "mem",
i + 1, /* PCI BAR # */ i + 1, /* PCI BAR # */
pci_resource_len(pdev, i), pci_resource_start(pdev, i), pci_resource_len(pdev, i), pci_resource_start(pdev, i),
pdev->slot_name); pci_name(pdev));
while(--i >= 0) while(--i >= 0)
pci_release_region(pdev, i); pci_release_region(pdev, i);
...@@ -576,7 +576,7 @@ pci_set_master(struct pci_dev *dev) ...@@ -576,7 +576,7 @@ pci_set_master(struct pci_dev *dev)
pci_read_config_word(dev, PCI_COMMAND, &cmd); pci_read_config_word(dev, PCI_COMMAND, &cmd);
if (! (cmd & PCI_COMMAND_MASTER)) { if (! (cmd & PCI_COMMAND_MASTER)) {
DBG("PCI: Enabling bus mastering for device %s\n", dev->slot_name); DBG("PCI: Enabling bus mastering for device %s\n", pci_name(dev));
cmd |= PCI_COMMAND_MASTER; cmd |= PCI_COMMAND_MASTER;
pci_write_config_word(dev, PCI_COMMAND, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd);
} }
...@@ -620,7 +620,7 @@ pci_generic_prep_mwi(struct pci_dev *dev) ...@@ -620,7 +620,7 @@ pci_generic_prep_mwi(struct pci_dev *dev)
return 0; return 0;
printk(KERN_WARNING "PCI: cache line size of %d is not supported " printk(KERN_WARNING "PCI: cache line size of %d is not supported "
"by device %s\n", pci_cache_line_size << 2, dev->slot_name); "by device %s\n", pci_cache_line_size << 2, pci_name(dev));
return -EINVAL; return -EINVAL;
} }
...@@ -653,7 +653,7 @@ pci_set_mwi(struct pci_dev *dev) ...@@ -653,7 +653,7 @@ pci_set_mwi(struct pci_dev *dev)
pci_read_config_word(dev, PCI_COMMAND, &cmd); pci_read_config_word(dev, PCI_COMMAND, &cmd);
if (! (cmd & PCI_COMMAND_INVALIDATE)) { if (! (cmd & PCI_COMMAND_INVALIDATE)) {
DBG("PCI: Enabling Mem-Wr-Inval for device %s\n", dev->slot_name); DBG("PCI: Enabling Mem-Wr-Inval for device %s\n", pci_name(dev));
cmd |= PCI_COMMAND_INVALIDATE; cmd |= PCI_COMMAND_INVALIDATE;
pci_write_config_word(dev, PCI_COMMAND, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd);
} }
......
...@@ -233,7 +233,7 @@ pci_pool_destroy (struct pci_pool *pool) ...@@ -233,7 +233,7 @@ pci_pool_destroy (struct pci_pool *pool)
struct pci_page, page_list); struct pci_page, page_list);
if (is_page_busy (pool->blocks_per_page, page->bitmap)) { if (is_page_busy (pool->blocks_per_page, page->bitmap)) {
printk (KERN_ERR "pci_pool_destroy %s/%s, %p busy\n", printk (KERN_ERR "pci_pool_destroy %s/%s, %p busy\n",
pool->dev ? pool->dev->slot_name : NULL, pool->dev ? pci_name(pool->dev) : NULL,
pool->name, page->vaddr); pool->name, page->vaddr);
/* leak the still-in-use consistent memory */ /* leak the still-in-use consistent memory */
list_del (&page->page_list); list_del (&page->page_list);
...@@ -359,7 +359,7 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma) ...@@ -359,7 +359,7 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma)
if ((page = pool_find_page (pool, dma)) == 0) { if ((page = pool_find_page (pool, dma)) == 0) {
printk (KERN_ERR "pci_pool_free %s/%s, %p/%lx (bad dma)\n", printk (KERN_ERR "pci_pool_free %s/%s, %p/%lx (bad dma)\n",
pool->dev ? pool->dev->slot_name : NULL, pool->dev ? pci_name(pool->dev) : NULL,
pool->name, vaddr, (unsigned long) dma); pool->name, vaddr, (unsigned long) dma);
return; return;
} }
...@@ -372,13 +372,13 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma) ...@@ -372,13 +372,13 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma)
#ifdef CONFIG_DEBUG_SLAB #ifdef CONFIG_DEBUG_SLAB
if (((dma - page->dma) + (void *)page->vaddr) != vaddr) { if (((dma - page->dma) + (void *)page->vaddr) != vaddr) {
printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%Lx\n", printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%Lx\n",
pool->dev ? pool->dev->slot_name : NULL, pool->dev ? pci_name(pool->dev) : NULL,
pool->name, vaddr, (unsigned long long) dma); pool->name, vaddr, (unsigned long long) dma);
return; return;
} }
if (page->bitmap [map] & (1UL << block)) { if (page->bitmap [map] & (1UL << block)) {
printk (KERN_ERR "pci_pool_free %s/%s, dma %Lx already free\n", printk (KERN_ERR "pci_pool_free %s/%s, dma %Lx already free\n",
pool->dev ? pool->dev->slot_name : NULL, pool->dev ? pci_name(pool->dev) : NULL,
pool->name, (unsigned long long)dma); pool->name, (unsigned long long)dma);
return; return;
} }
......
...@@ -33,7 +33,7 @@ static void __devinit quirk_passive_release(struct pci_dev *dev) ...@@ -33,7 +33,7 @@ static void __devinit quirk_passive_release(struct pci_dev *dev)
while ((d = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, d))) { while ((d = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, d))) {
pci_read_config_byte(d, 0x82, &dlc); pci_read_config_byte(d, 0x82, &dlc);
if (!(dlc & 1<<1)) { if (!(dlc & 1<<1)) {
printk(KERN_ERR "PCI: PIIX3: Enabling Passive Release on %s\n", d->slot_name); printk(KERN_ERR "PCI: PIIX3: Enabling Passive Release on %s\n", pci_name(d));
dlc |= 1<<1; dlc |= 1<<1;
pci_write_config_byte(d, 0x82, dlc); pci_write_config_byte(d, 0x82, dlc);
} }
...@@ -437,7 +437,7 @@ static void __devinit quirk_via_irqpic(struct pci_dev *dev) ...@@ -437,7 +437,7 @@ static void __devinit quirk_via_irqpic(struct pci_dev *dev)
if (new_irq != irq) { if (new_irq != irq) {
printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n", printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n",
dev->slot_name, irq, new_irq); pci_name(dev), irq, new_irq);
udelay(15); udelay(15);
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
...@@ -598,7 +598,7 @@ static void __devinit quirk_ide_bases(struct pci_dev *dev) ...@@ -598,7 +598,7 @@ static void __devinit quirk_ide_bases(struct pci_dev *dev)
return; return;
printk(KERN_INFO "PCI: Ignoring BAR%d-%d of IDE controller %s\n", printk(KERN_INFO "PCI: Ignoring BAR%d-%d of IDE controller %s\n",
first_bar, last_bar, dev->slot_name); first_bar, last_bar, pci_name(dev));
} }
/* /*
...@@ -856,7 +856,7 @@ static void pci_do_fixups(struct pci_dev *dev, int pass, struct pci_fixup *f) ...@@ -856,7 +856,7 @@ static void pci_do_fixups(struct pci_dev *dev, int pass, struct pci_fixup *f)
(f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) && (f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) &&
(f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) {
#ifdef DEBUG #ifdef DEBUG
printk(KERN_INFO "PCI: Calling quirk %p for %s\n", f->hook, dev->slot_name); printk(KERN_INFO "PCI: Calling quirk %p for %s\n", f->hook, pci_name(dev));
#endif #endif
f->hook(dev); f->hook(dev);
} }
......
...@@ -81,7 +81,7 @@ pci_setup_cardbus(struct pci_bus *bus) ...@@ -81,7 +81,7 @@ pci_setup_cardbus(struct pci_bus *bus)
struct pci_bus_region region; struct pci_bus_region region;
printk("PCI: Bus %d, cardbus bridge: %s\n", printk("PCI: Bus %d, cardbus bridge: %s\n",
bus->number, bridge->slot_name); bus->number, pci_name(bridge));
pcibios_resource_to_bus(bridge, &region, bus->resource[0]); pcibios_resource_to_bus(bridge, &region, bus->resource[0]);
if (bus->resource[0]->flags & IORESOURCE_IO) { if (bus->resource[0]->flags & IORESOURCE_IO) {
...@@ -344,7 +344,7 @@ pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type) ...@@ -344,7 +344,7 @@ pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type)
if (order > 11) { if (order > 11) {
printk(KERN_WARNING "PCI: region %s/%d " printk(KERN_WARNING "PCI: region %s/%d "
"too large: %lx-%lx\n", "too large: %lx-%lx\n",
dev->slot_name, i, r->start, r->end); pci_name(dev), i, r->start, r->end);
r->flags = 0; r->flags = 0;
continue; continue;
} }
...@@ -513,7 +513,7 @@ pci_bus_assign_resources(struct pci_bus *bus) ...@@ -513,7 +513,7 @@ pci_bus_assign_resources(struct pci_bus *bus)
default: default:
printk(KERN_INFO "PCI: not setting up bridge %s " printk(KERN_INFO "PCI: not setting up bridge %s "
"for bus %d\n", dev->slot_name, b->number); "for bus %d\n", pci_name(dev), b->number);
break; break;
} }
} }
......
...@@ -68,7 +68,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) ...@@ -68,7 +68,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
if ((new ^ check) & mask) { if ((new ^ check) & mask) {
printk(KERN_ERR "PCI: Error while updating region " printk(KERN_ERR "PCI: Error while updating region "
"%s/%d (%08x != %08x)\n", dev->slot_name, resno, "%s/%d (%08x != %08x)\n", pci_name(dev), resno,
new, check); new, check);
} }
...@@ -80,7 +80,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) ...@@ -80,7 +80,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
if (check != new) { if (check != new) {
printk(KERN_ERR "PCI: Error updating region " printk(KERN_ERR "PCI: Error updating region "
"%s/%d (high %08x != %08x)\n", "%s/%d (high %08x != %08x)\n",
dev->slot_name, resno, new, check); pci_name(dev), resno, new, check);
} }
} }
} }
...@@ -101,7 +101,7 @@ pci_claim_resource(struct pci_dev *dev, int resource) ...@@ -101,7 +101,7 @@ pci_claim_resource(struct pci_dev *dev, int resource)
printk(KERN_ERR "PCI: %s region %d of %s %s [%lx:%lx]\n", printk(KERN_ERR "PCI: %s region %d of %s %s [%lx:%lx]\n",
root ? "Address space collision on" : root ? "Address space collision on" :
"No parent found for", "No parent found for",
resource, dtype, dev->slot_name, res->start, res->end); resource, dtype, pci_name(dev), res->start, res->end);
} }
return err; return err;
...@@ -139,7 +139,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) ...@@ -139,7 +139,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
if (ret) { if (ret) {
printk(KERN_ERR "PCI: Failed to allocate resource %d(%lx-%lx) for %s\n", printk(KERN_ERR "PCI: Failed to allocate resource %d(%lx-%lx) for %s\n",
resno, res->start, res->end, dev->slot_name); resno, res->start, res->end, pci_name(dev));
} else if (resno < PCI_BRIDGE_RESOURCES) { } else if (resno < PCI_BRIDGE_RESOURCES) {
pci_update_resource(dev, res, resno); pci_update_resource(dev, res, resno);
} }
......
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