aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-01-25 03:34:08 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:50:07 -0500
commit8fed4b65236c44d090bd62f2d14938ae791e0260 (patch)
tree53b0609ff8e53d9b1410f707f59cd14a555f8c04 /drivers/pci/pci.c
parent0fcfdabbdbedb3bdc63f29209aeeac805df78a92 (diff)
MSI: Combine pci_(save|restore)_msi/msix_state
The PCI save/restore code doesn't need to care about MSI vs MSI-X, all it really wants is to say "save/restore all MSI(-X) info for this device". This is borne out in the code, we call the MSI and MSI-X save routines side by side, and similarly with the restore routines. So combine the MSI/MSI-X routines into pci_save_msi_state() and pci_restore_msi_state(). It is up to those routines to decide what state needs to be saved. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7ae709024456..84c757ba0664 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -634,8 +634,6 @@ pci_save_state(struct pci_dev *dev)
634 pci_read_config_dword(dev, i * 4,&dev->saved_config_space[i]); 634 pci_read_config_dword(dev, i * 4,&dev->saved_config_space[i]);
635 if ((i = pci_save_msi_state(dev)) != 0) 635 if ((i = pci_save_msi_state(dev)) != 0)
636 return i; 636 return i;
637 if ((i = pci_save_msix_state(dev)) != 0)
638 return i;
639 if ((i = pci_save_pcie_state(dev)) != 0) 637 if ((i = pci_save_pcie_state(dev)) != 0)
640 return i; 638 return i;
641 if ((i = pci_save_pcix_state(dev)) != 0) 639 if ((i = pci_save_pcix_state(dev)) != 0)
@@ -673,7 +671,7 @@ pci_restore_state(struct pci_dev *dev)
673 } 671 }
674 pci_restore_pcix_state(dev); 672 pci_restore_pcix_state(dev);
675 pci_restore_msi_state(dev); 673 pci_restore_msi_state(dev);
676 pci_restore_msix_state(dev); 674
677 return 0; 675 return 0;
678} 676}
679 677