diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2020-12-03 19:51:09 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-12-04 19:09:03 +0100 |
commit | 830dfe88ea37881cbb7d390e90b45611929d5943 (patch) | |
tree | aee782cc03f40bd6dbc2523916bab9f6da9eb226 /drivers/pci/pci.h | |
parent | PCI/MSI: Move MSI/MSI-X init to msi.c (diff) | |
download | linux-830dfe88ea37881cbb7d390e90b45611929d5943.tar.xz linux-830dfe88ea37881cbb7d390e90b45611929d5943.zip |
PCI/MSI: Move MSI/MSI-X flags updaters to msi.c
pci_msi_set_enable() and pci_msix_clear_and_set_ctrl() are only used from
msi.c, so move them from drivers/pci/pci.h to msi.c. No functional change
intended.
Link: https://lore.kernel.org/r/20201203185110.1583077-3-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 3f5f303775c4..5692f11bc146 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -187,27 +187,6 @@ void pci_no_msi(void); static inline void pci_no_msi(void) { } #endif -static inline void pci_msi_set_enable(struct pci_dev *dev, int enable) -{ - u16 control; - - pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &control); - control &= ~PCI_MSI_FLAGS_ENABLE; - if (enable) - control |= PCI_MSI_FLAGS_ENABLE; - pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, control); -} - -static inline void pci_msix_clear_and_set_ctrl(struct pci_dev *dev, u16 clear, u16 set) -{ - u16 ctrl; - - pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &ctrl); - ctrl &= ~clear; - ctrl |= set; - pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, ctrl); -} - void pci_realloc_get_opt(char *); static inline int pci_no_d1d2(struct pci_dev *dev) |