diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci.c | 9 | ||||
-rw-r--r-- | drivers/pci/pci.h | 1 | ||||
-rw-r--r-- | drivers/pci/probe.c | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 9c89447e7b21..e7dfcd447571 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1916,6 +1916,15 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev) | |||
1916 | "unable to preallocate PCI-X save buffer\n"); | 1916 | "unable to preallocate PCI-X save buffer\n"); |
1917 | } | 1917 | } |
1918 | 1918 | ||
1919 | void pci_free_cap_save_buffers(struct pci_dev *dev) | ||
1920 | { | ||
1921 | struct pci_cap_saved_state *tmp; | ||
1922 | struct hlist_node *pos, *n; | ||
1923 | |||
1924 | hlist_for_each_entry_safe(tmp, pos, n, &dev->saved_cap_space, next) | ||
1925 | kfree(tmp); | ||
1926 | } | ||
1927 | |||
1919 | /** | 1928 | /** |
1920 | * pci_enable_ari - enable ARI forwarding if hardware support it | 1929 | * pci_enable_ari - enable ARI forwarding if hardware support it |
1921 | * @dev: the PCI device | 1930 | * @dev: the PCI device |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index aaf7ff8c517f..586ac9b097e4 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -73,6 +73,7 @@ extern int __pci_pme_wakeup(struct pci_dev *dev, void *ign); | |||
73 | extern void pci_pm_init(struct pci_dev *dev); | 73 | extern void pci_pm_init(struct pci_dev *dev); |
74 | extern void platform_pci_wakeup_init(struct pci_dev *dev); | 74 | extern void platform_pci_wakeup_init(struct pci_dev *dev); |
75 | extern void pci_allocate_cap_save_buffers(struct pci_dev *dev); | 75 | extern void pci_allocate_cap_save_buffers(struct pci_dev *dev); |
76 | void pci_free_cap_save_buffers(struct pci_dev *dev); | ||
76 | 77 | ||
77 | static inline void pci_wakeup_event(struct pci_dev *dev) | 78 | static inline void pci_wakeup_event(struct pci_dev *dev) |
78 | { | 79 | { |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index aa9b1dec0d3e..dc904bd4b569 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -1024,6 +1024,7 @@ static void pci_release_capabilities(struct pci_dev *dev) | |||
1024 | { | 1024 | { |
1025 | pci_vpd_release(dev); | 1025 | pci_vpd_release(dev); |
1026 | pci_iov_release(dev); | 1026 | pci_iov_release(dev); |
1027 | pci_free_cap_save_buffers(dev); | ||
1027 | } | 1028 | } |
1028 | 1029 | ||
1029 | /** | 1030 | /** |