summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-06-14 17:08:48 -0600
committerBjorn Helgaas <bhelgaas@google.com>2013-06-14 17:08:48 -0600
commit726246d2e6d0ed53ac22b6fec50d1345f25e6730 (patch)
treea02c267d02bfea91fa106e17b8ee22675881d848 /drivers/pci
parent5899309c90971d5418abc4bf370bee871ff6072c (diff)
parentfc6504b3a4dc9beae782a11e6f7c3c4a9f077fb8 (diff)
downloadblackbird-op-linux-726246d2e6d0ed53ac22b6fec50d1345f25e6730.tar.gz
blackbird-op-linux-726246d2e6d0ed53ac22b6fec50d1345f25e6730.zip
Merge branch 'pci/misc' into next
* pci/misc: PCI / ACPI / PM: Use correct power state strings in messages PCI: Fix comment typo for pcie_pme_remove() PCI: Add pcibios_release_device()
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-acpi.c6
-rw-r--r--drivers/pci/pci.c10
-rw-r--r--drivers/pci/pcie/pme.c2
-rw-r--r--drivers/pci/probe.c1
4 files changed, 15 insertions, 4 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 6c15d6a96935..dbdc5f7e2b29 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -186,8 +186,8 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
[PCI_D0] = ACPI_STATE_D0,
[PCI_D1] = ACPI_STATE_D1,
[PCI_D2] = ACPI_STATE_D2,
- [PCI_D3hot] = ACPI_STATE_D3,
- [PCI_D3cold] = ACPI_STATE_D3
+ [PCI_D3hot] = ACPI_STATE_D3_COLD,
+ [PCI_D3cold] = ACPI_STATE_D3_COLD,
};
int error = -EINVAL;
@@ -211,7 +211,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
if (!error)
dev_info(&dev->dev, "power state changed by ACPI to %s\n",
- pci_power_name(state));
+ acpi_power_state_string(state_conv[state]));
return error;
}
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e5f4e55d407d..709791b70ca0 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1335,6 +1335,16 @@ int __weak pcibios_add_device (struct pci_dev *dev)
}
/**
+ * pcibios_release_device - provide arch specific hooks when releasing device dev
+ * @dev: the PCI device being released
+ *
+ * Permits the platform to provide architecture specific functionality when
+ * devices are released. This is the default implementation. Architecture
+ * implementations can override this.
+ */
+void __weak pcibios_release_device(struct pci_dev *dev) {}
+
+/**
* pcibios_disable_device - disable arch specific PCI resources for device dev
* @dev: the PCI device to disable
*
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c
index 795db1f9d50c..e56e594ce112 100644
--- a/drivers/pci/pcie/pme.c
+++ b/drivers/pci/pcie/pme.c
@@ -408,7 +408,7 @@ static int pcie_pme_resume(struct pcie_device *srv)
/**
* pcie_pme_remove - Prepare PCIe PME service device for removal.
- * @srv - PCIe service device to resume.
+ * @srv - PCIe service device to remove.
*/
static void pcie_pme_remove(struct pcie_device *srv)
{
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index fe5b50bd7536..d0c33aac768e 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1151,6 +1151,7 @@ static void pci_release_dev(struct device *dev)
pci_dev = to_pci_dev(dev);
pci_release_capabilities(pci_dev);
pci_release_of_node(pci_dev);
+ pcibios_release_device(pci_dev);
kfree(pci_dev);
}
OpenPOWER on IntegriCloud