/* pci_save_state - save the PCI configuration space of a device before suspending @dev: - PCI device that we're dealing with  */
int pci_save_state(struct pci_dev *dev)
/* pci_save_state - save the PCI configuration space of a device before suspending @dev: - PCI device that we're dealing with  */
int pci_save_state(struct pci_dev *dev)
{
	int i;
	for (i = 0; i < 16; i++)
		pci_read_config_dword(dev, i * 4, &dev->saved_config_space[i]);
	dev->state_saved = true;
	if ((i = pci_save_pcie_state(dev)) != 0)
		return i;
	if ((i = pci_save_pcix_state(dev)) != 0)
		return i;
	return 0;
}