diff mbox

[v4,07/11] PCI: Move pci_vpd_release() from header file to pci/access.c

Message ID 20160223004714.10635.28635.stgit@bhelgaas-glaptop2.roam.corp.google.com
State Accepted
Headers show

Commit Message

Bjorn Helgaas Feb. 23, 2016, 12:47 a.m. UTC
Move pci_vpd_release() so it's next to the other VPD functions.  This puts
it next to pci_vpd_pci22_init(), which allocates the space freed by
pci_vpd_release().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/access.c |    6 ++++++
 drivers/pci/pci.h    |    6 +-----
 2 files changed, 7 insertions(+), 5 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Hannes Reinecke Feb. 23, 2016, 12:21 p.m. UTC | #1
On 02/23/2016 08:47 AM, Bjorn Helgaas wrote:
> Move pci_vpd_release() so it's next to the other VPD functions.  This puts
> it next to pci_vpd_pci22_init(), which allocates the space freed by
> pci_vpd_release().
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
diff mbox

Patch

diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 4c4c734..ca42a33 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -581,6 +581,12 @@  int pci_vpd_pci22_init(struct pci_dev *dev)
 	return 0;
 }
 
+void pci_vpd_release(struct pci_dev *dev)
+{
+	if (dev->vpd)
+		dev->vpd->ops->release(dev);
+}
+
 /**
  * pci_cfg_access_lock - Lock PCI config reads/writes
  * @dev:	pci device struct
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 9a1660f..52e86b0 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -107,11 +107,7 @@  struct pci_vpd {
 };
 
 int pci_vpd_pci22_init(struct pci_dev *dev);
-static inline void pci_vpd_release(struct pci_dev *dev)
-{
-	if (dev->vpd)
-		dev->vpd->ops->release(dev);
-}
+void pci_vpd_release(struct pci_dev *dev);
 
 /* PCI /proc functions */
 #ifdef CONFIG_PROC_FS