summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index ff810c39e0bd..3ceb5d7da821 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -414,7 +414,7 @@ struct pci_dev {
struct resource dma_resource[DEVICE_COUNT_DMA];
struct resource irq_resource[DEVICE_COUNT_IRQ];
- char slot_name[8]; /* slot name */
+ char * slot_name; /* pointer to dev.bus_id */
/* These fields are used by common fixups */
unsigned int transparent:1; /* Transparent PCI bridge */
@@ -804,6 +804,14 @@ static inline void pci_set_drvdata (struct pci_dev *pdev, void *data)
dev_set_drvdata(&pdev->dev, data);
}
+/* If you want to know what to call your pci_dev, ask this function.
+ * Again, it's a wrapper around the generic device.
+ */
+static inline char *pci_name(struct pci_dev *pdev)
+{
+ return pdev->dev.bus_id;
+}
+
/*
* The world is not perfect and supplies us with broken PCI devices.
* For at least a part of these bugs we need a work-around, so both