PCI: Expose pci_load_saved_state for public consumption.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 3 Dec 2014 21:40:31 +0000 (16:40 -0500)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 4 Dec 2014 12:42:02 +0000 (12:42 +0000)
We have the pci_load_and_free_saved_state, and pci_store_saved_state
but are missing the functionality to just load the state
multiple times in the PCI device without having to free/save
the state.

This patch makes it possible to use this function.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/pci/pci.c
include/linux/pci.h

index 625a4ace10b4411aed1cbda278a3851d9299965d..f00a9d63fd7d0b971081a68e2379cb3bcab3de43 100644 (file)
@@ -1142,8 +1142,8 @@ EXPORT_SYMBOL_GPL(pci_store_saved_state);
  * @dev: PCI device that we're dealing with
  * @state: Saved state returned from pci_store_saved_state()
  */
-static int pci_load_saved_state(struct pci_dev *dev,
-                               struct pci_saved_state *state)
+int pci_load_saved_state(struct pci_dev *dev,
+                        struct pci_saved_state *state)
 {
        struct pci_cap_saved_data *cap;
 
@@ -1171,6 +1171,7 @@ static int pci_load_saved_state(struct pci_dev *dev,
        dev->state_saved = true;
        return 0;
 }
+EXPORT_SYMBOL_GPL(pci_load_saved_state);
 
 /**
  * pci_load_and_free_saved_state - Reload the save state pointed to by state,
index 4c8ac5fcc224e2ab4c6af62cd01e130b2bf7dbb1..42ae347d3fc78823a47cca5dc100d3fcbd57ab0c 100644 (file)
@@ -1004,6 +1004,8 @@ void __iomem __must_check *pci_platform_rom(struct pci_dev *pdev, size_t *size);
 int pci_save_state(struct pci_dev *dev);
 void pci_restore_state(struct pci_dev *dev);
 struct pci_saved_state *pci_store_saved_state(struct pci_dev *dev);
+int pci_load_saved_state(struct pci_dev *dev,
+                        struct pci_saved_state *state);
 int pci_load_and_free_saved_state(struct pci_dev *dev,
                                  struct pci_saved_state **state);
 struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap);