diff options
| author | Matthew Wilcox <willy@debian.org> | 2003-06-26 03:27:43 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-06-26 03:27:43 -0700 |
| commit | a822b57bb40c2cf45b86c6d23fd2a1e7b527bcd6 (patch) | |
| tree | 8c6da51344ce26cdde309e57d96bc7d4450d9140 /include/linux/pci.h | |
| parent | f5f7e4d0cfa69ded0fdbe50435d0c972313cdca6 (diff) | |
[PATCH] PCI: create pci_name()
This patch introduces pci_name() and converts slot_name into a pointer to
dev.bus_id.
Diffstat (limited to 'include/linux/pci.h')
| -rw-r--r-- | include/linux/pci.h | 10 |
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 |
