aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/access.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2014-01-10 17:10:13 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-01-13 13:14:43 -0500
commit3984ca1c6e493d06fa7e8dc96ce2b23b86175ec4 (patch)
treee0be9de2afdcdab7e83f3a410b30345ad0ef1fcd /drivers/pci/access.c
parent7c2dd2d7cfabdb37875c5e481a0c3cc5962bb0b6 (diff)
PCI: Remove unused pci_vpd_truncate()
My philosophy is unused code is dead code. And dead code is subject to bit rot and is a likely source of bugs. Use it or lose it. This reverts db5679437a2b ("PCI: add interface to set visible size of VPD"), removing this interface: pci_vpd_truncate() [bhelgaas: split to separate patch, also remove prototype from pci.h] Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/access.c')
-rw-r--r--drivers/pci/access.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 0857ca981fae..7f8b78c08879 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -381,30 +381,6 @@ int pci_vpd_pci22_init(struct pci_dev *dev)
381} 381}
382 382
383/** 383/**
384 * pci_vpd_truncate - Set available Vital Product Data size
385 * @dev: pci device struct
386 * @size: available memory in bytes
387 *
388 * Adjust size of available VPD area.
389 */
390int pci_vpd_truncate(struct pci_dev *dev, size_t size)
391{
392 if (!dev->vpd)
393 return -EINVAL;
394
395 /* limited by the access method */
396 if (size > dev->vpd->len)
397 return -EINVAL;
398
399 dev->vpd->len = size;
400 if (dev->vpd->attr)
401 dev->vpd->attr->size = size;
402
403 return 0;
404}
405EXPORT_SYMBOL(pci_vpd_truncate);
406
407/**
408 * pci_cfg_access_lock - Lock PCI config reads/writes 384 * pci_cfg_access_lock - Lock PCI config reads/writes
409 * @dev: pci device struct 385 * @dev: pci device struct
410 * 386 *