summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2014-01-10 19:14:48 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-01-13 13:57:29 -0500
commit0b950f0f3c67e42f18c655a3ab3e36ea192635bb (patch)
tree65094ce9f4b053c0188ad08466da914a0386087d /drivers/pci/pci.c
parente2760c54a4f5131867bf1b35d59169267d35d3d0 (diff)
PCI: Make local functions static
Using 'make namespacecheck' identify code which should be declared static. Checked for users in other driver/archs as well. Compile tested only. This stops exporting the following interfaces to modules: pci_target_state() pci_load_saved_state() [bhelgaas: retained pci_find_next_ext_capability() and pci_cfg_space_size()] Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6db2f1a441e9..9ea31080870f 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -657,6 +657,28 @@ static int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state)
657} 657}
658 658
659/** 659/**
660 * pci_wakeup - Wake up a PCI device
661 * @pci_dev: Device to handle.
662 * @ign: ignored parameter
663 */
664static int pci_wakeup(struct pci_dev *pci_dev, void *ign)
665{
666 pci_wakeup_event(pci_dev);
667 pm_request_resume(&pci_dev->dev);
668 return 0;
669}
670
671/**
672 * pci_wakeup_bus - Walk given bus and wake up devices on it
673 * @bus: Top bus of the subtree to walk.
674 */
675static void pci_wakeup_bus(struct pci_bus *bus)
676{
677 if (bus)
678 pci_walk_bus(bus, pci_wakeup, NULL);
679}
680
681/**
660 * __pci_start_power_transition - Start power transition of a PCI device 682 * __pci_start_power_transition - Start power transition of a PCI device
661 * @dev: PCI device to handle. 683 * @dev: PCI device to handle.
662 * @state: State to put the device into. 684 * @state: State to put the device into.
@@ -835,8 +857,8 @@ EXPORT_SYMBOL(pci_choose_state);
835#define PCI_EXP_SAVE_REGS 7 857#define PCI_EXP_SAVE_REGS 7
836 858
837 859
838static struct pci_cap_saved_state *pci_find_saved_cap( 860static struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *pci_dev,
839 struct pci_dev *pci_dev, char cap) 861 char cap)
840{ 862{
841 struct pci_cap_saved_state *tmp; 863 struct pci_cap_saved_state *tmp;
842 864
@@ -1071,7 +1093,8 @@ EXPORT_SYMBOL_GPL(pci_store_saved_state);
1071 * @dev: PCI device that we're dealing with 1093 * @dev: PCI device that we're dealing with
1072 * @state: Saved state returned from pci_store_saved_state() 1094 * @state: Saved state returned from pci_store_saved_state()
1073 */ 1095 */
1074int pci_load_saved_state(struct pci_dev *dev, struct pci_saved_state *state) 1096static int pci_load_saved_state(struct pci_dev *dev,
1097 struct pci_saved_state *state)
1075{ 1098{
1076 struct pci_cap_saved_data *cap; 1099 struct pci_cap_saved_data *cap;
1077 1100
@@ -1099,7 +1122,6 @@ int pci_load_saved_state(struct pci_dev *dev, struct pci_saved_state *state)
1099 dev->state_saved = true; 1122 dev->state_saved = true;
1100 return 0; 1123 return 0;
1101} 1124}
1102EXPORT_SYMBOL_GPL(pci_load_saved_state);
1103 1125
1104/** 1126/**
1105 * pci_load_and_free_saved_state - Reload the save state pointed to by state, 1127 * pci_load_and_free_saved_state - Reload the save state pointed to by state,
@@ -1531,27 +1553,6 @@ void pci_pme_wakeup_bus(struct pci_bus *bus)
1531 pci_walk_bus(bus, pci_pme_wakeup, (void *)true); 1553 pci_walk_bus(bus, pci_pme_wakeup, (void *)true);
1532} 1554}
1533 1555
1534/**
1535 * pci_wakeup - Wake up a PCI device
1536 * @pci_dev: Device to handle.
1537 * @ign: ignored parameter
1538 */
1539static int pci_wakeup(struct pci_dev *pci_dev, void *ign)
1540{
1541 pci_wakeup_event(pci_dev);
1542 pm_request_resume(&pci_dev->dev);
1543 return 0;
1544}
1545
1546/**
1547 * pci_wakeup_bus - Walk given bus and wake up devices on it
1548 * @bus: Top bus of the subtree to walk.
1549 */
1550void pci_wakeup_bus(struct pci_bus *bus)
1551{
1552 if (bus)
1553 pci_walk_bus(bus, pci_wakeup, NULL);
1554}
1555 1556
1556/** 1557/**
1557 * pci_pme_capable - check the capability of PCI device to generate PME# 1558 * pci_pme_capable - check the capability of PCI device to generate PME#
@@ -1765,7 +1766,7 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable)
1765 * If the platform can't manage @dev, return the deepest state from which it 1766 * If the platform can't manage @dev, return the deepest state from which it
1766 * can generate wake events, based on any available PME info. 1767 * can generate wake events, based on any available PME info.
1767 */ 1768 */
1768pci_power_t pci_target_state(struct pci_dev *dev) 1769static pci_power_t pci_target_state(struct pci_dev *dev)
1769{ 1770{
1770 pci_power_t target_state = PCI_D3hot; 1771 pci_power_t target_state = PCI_D3hot;
1771 1772
@@ -4206,7 +4207,6 @@ EXPORT_SYMBOL(pci_restore_state);
4206EXPORT_SYMBOL(pci_pme_capable); 4207EXPORT_SYMBOL(pci_pme_capable);
4207EXPORT_SYMBOL(pci_pme_active); 4208EXPORT_SYMBOL(pci_pme_active);
4208EXPORT_SYMBOL(pci_wake_from_d3); 4209EXPORT_SYMBOL(pci_wake_from_d3);
4209EXPORT_SYMBOL(pci_target_state);
4210EXPORT_SYMBOL(pci_prepare_to_sleep); 4210EXPORT_SYMBOL(pci_prepare_to_sleep);
4211EXPORT_SYMBOL(pci_back_from_sleep); 4211EXPORT_SYMBOL(pci_back_from_sleep);
4212EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state); 4212EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);