Skip to content

Commit c6201cd

Browse files
committed
PCI/MSI: Remove unused pci_msi_off()
pci_msi_off() is unused, so remove it. Removes the exported symbol pci_msi_off(). Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 9680319 commit c6201cd

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

drivers/pci/pci.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3101,39 +3101,6 @@ bool pci_check_and_unmask_intx(struct pci_dev *dev)
31013101
}
31023102
EXPORT_SYMBOL_GPL(pci_check_and_unmask_intx);
31033103

3104-
/**
3105-
* pci_msi_off - disables any MSI or MSI-X capabilities
3106-
* @dev: the PCI device to operate on
3107-
*
3108-
* If you want to use MSI, see pci_enable_msi() and friends.
3109-
* This is a lower-level primitive that allows us to disable
3110-
* MSI operation at the device level.
3111-
*/
3112-
void pci_msi_off(struct pci_dev *dev)
3113-
{
3114-
int pos;
3115-
u16 control;
3116-
3117-
/*
3118-
* This looks like it could go in msi.c, but we need it even when
3119-
* CONFIG_PCI_MSI=n. For the same reason, we can't use
3120-
* dev->msi_cap or dev->msix_cap here.
3121-
*/
3122-
pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
3123-
if (pos) {
3124-
pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
3125-
control &= ~PCI_MSI_FLAGS_ENABLE;
3126-
pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
3127-
}
3128-
pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
3129-
if (pos) {
3130-
pci_read_config_word(dev, pos + PCI_MSIX_FLAGS, &control);
3131-
control &= ~PCI_MSIX_FLAGS_ENABLE;
3132-
pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control);
3133-
}
3134-
}
3135-
EXPORT_SYMBOL_GPL(pci_msi_off);
3136-
31373104
int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size)
31383105
{
31393106
return dma_set_max_seg_size(&dev->dev, size);

include/linux/pci.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,6 @@ void pci_intx(struct pci_dev *dev, int enable);
974974
bool pci_intx_mask_supported(struct pci_dev *dev);
975975
bool pci_check_and_mask_intx(struct pci_dev *dev);
976976
bool pci_check_and_unmask_intx(struct pci_dev *dev);
977-
void pci_msi_off(struct pci_dev *dev);
978977
int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size);
979978
int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask);
980979
int pci_wait_for_pending(struct pci_dev *dev, int pos, u16 mask);

0 commit comments

Comments
 (0)