diff options
-rw-r--r-- | drivers/pci/pci.c | 19 | ||||
-rw-r--r-- | include/linux/pci.h | 19 |
2 files changed, 19 insertions, 19 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e7dfcd447571..8f30736dbf3f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -825,6 +825,19 @@ EXPORT_SYMBOL(pci_choose_state); | |||
825 | #define pcie_cap_has_sltctl2(type, flags) \ | 825 | #define pcie_cap_has_sltctl2(type, flags) \ |
826 | ((flags & PCI_EXP_FLAGS_VERS) > 1) | 826 | ((flags & PCI_EXP_FLAGS_VERS) > 1) |
827 | 827 | ||
828 | static struct pci_cap_saved_state *pci_find_saved_cap( | ||
829 | struct pci_dev *pci_dev, char cap) | ||
830 | { | ||
831 | struct pci_cap_saved_state *tmp; | ||
832 | struct hlist_node *pos; | ||
833 | |||
834 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { | ||
835 | if (tmp->cap.cap_nr == cap) | ||
836 | return tmp; | ||
837 | } | ||
838 | return NULL; | ||
839 | } | ||
840 | |||
828 | static int pci_save_pcie_state(struct pci_dev *dev) | 841 | static int pci_save_pcie_state(struct pci_dev *dev) |
829 | { | 842 | { |
830 | int pos, i = 0; | 843 | int pos, i = 0; |
@@ -1869,6 +1882,12 @@ void platform_pci_wakeup_init(struct pci_dev *dev) | |||
1869 | platform_pci_sleep_wake(dev, false); | 1882 | platform_pci_sleep_wake(dev, false); |
1870 | } | 1883 | } |
1871 | 1884 | ||
1885 | static void pci_add_saved_cap(struct pci_dev *pci_dev, | ||
1886 | struct pci_cap_saved_state *new_cap) | ||
1887 | { | ||
1888 | hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); | ||
1889 | } | ||
1890 | |||
1872 | /** | 1891 | /** |
1873 | * pci_add_save_buffer - allocate buffer for saving given capability registers | 1892 | * pci_add_save_buffer - allocate buffer for saving given capability registers |
1874 | * @dev: the PCI device | 1893 | * @dev: the PCI device |
diff --git a/include/linux/pci.h b/include/linux/pci.h index f8caaab4b3fc..bcaa51ca7858 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -368,25 +368,6 @@ static inline int pci_channel_offline(struct pci_dev *pdev) | |||
368 | return (pdev->error_state != pci_channel_io_normal); | 368 | return (pdev->error_state != pci_channel_io_normal); |
369 | } | 369 | } |
370 | 370 | ||
371 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | ||
372 | struct pci_dev *pci_dev, char cap) | ||
373 | { | ||
374 | struct pci_cap_saved_state *tmp; | ||
375 | struct hlist_node *pos; | ||
376 | |||
377 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { | ||
378 | if (tmp->cap.cap_nr == cap) | ||
379 | return tmp; | ||
380 | } | ||
381 | return NULL; | ||
382 | } | ||
383 | |||
384 | static inline void pci_add_saved_cap(struct pci_dev *pci_dev, | ||
385 | struct pci_cap_saved_state *new_cap) | ||
386 | { | ||
387 | hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); | ||
388 | } | ||
389 | |||
390 | /* | 371 | /* |
391 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond | 372 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond |
392 | * to P2P or CardBus bridge windows) go in a table. Additional ones (for | 373 | * to P2P or CardBus bridge windows) go in a table. Additional ones (for |