aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.h
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.h
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.h')
-rw-r--r--drivers/pci/pci.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 4948db0f8100..a4f2d580625e 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -52,17 +52,15 @@ void pci_no_msi(void);
52static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { } 52static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { }
53static inline void pci_no_msi(void) { } 53static inline void pci_no_msi(void) { }
54#endif 54#endif
55
55#if defined(CONFIG_PCI_MSI) && defined(CONFIG_PM) 56#if defined(CONFIG_PCI_MSI) && defined(CONFIG_PM)
56int pci_save_msi_state(struct pci_dev *dev); 57int pci_save_msi_state(struct pci_dev *dev);
57int pci_save_msix_state(struct pci_dev *dev);
58void pci_restore_msi_state(struct pci_dev *dev); 58void pci_restore_msi_state(struct pci_dev *dev);
59void pci_restore_msix_state(struct pci_dev *dev);
60#else 59#else
61static inline int pci_save_msi_state(struct pci_dev *dev) { return 0; } 60static inline int pci_save_msi_state(struct pci_dev *dev) { return 0; }
62static inline int pci_save_msix_state(struct pci_dev *dev) { return 0; }
63static inline void pci_restore_msi_state(struct pci_dev *dev) {} 61static inline void pci_restore_msi_state(struct pci_dev *dev) {}
64static inline void pci_restore_msix_state(struct pci_dev *dev) {}
65#endif 62#endif
63
66static inline int pci_no_d1d2(struct pci_dev *dev) 64static inline int pci_no_d1d2(struct pci_dev *dev)
67{ 65{
68 unsigned int parent_dstates = 0; 66 unsigned int parent_dstates = 0;