summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSui Jingfeng <suijingfeng@loongson.cn>2023-05-31 18:27:44 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-19 16:36:11 +0200
commit5cf374018fc5635c197e95fac00f9f50deeb91c6 (patch)
tree5f5d2a6039629102961a5a45b0392b1adc5ea077 /include
parent0e5279a5c336a47b48edf3d71e08e816125c2e1f (diff)
downloadlinux-stable-5cf374018fc5635c197e95fac00f9f50deeb91c6.tar.gz
linux-stable-5cf374018fc5635c197e95fac00f9f50deeb91c6.tar.bz2
linux-stable-5cf374018fc5635c197e95fac00f9f50deeb91c6.zip
PCI: Add pci_clear_master() stub for non-CONFIG_PCI
[ Upstream commit 2aa5ac633259843f656eb6ecff4cf01e8e810c5e ] Add a pci_clear_master() stub when CONFIG_PCI is not set so drivers that support both PCI and platform devices don't need #ifdefs or extra Kconfig symbols for the PCI parts. [bhelgaas: commit log] Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") Link: https://lore.kernel.org/r/20230531102744.2354313-1-suijingfeng@loongson.cn Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 60b8772b5bd4..c69a2cc1f412 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1903,6 +1903,7 @@ static inline int pci_dev_present(const struct pci_device_id *ids)
#define pci_dev_put(dev) do { } while (0)
static inline void pci_set_master(struct pci_dev *dev) { }
+static inline void pci_clear_master(struct pci_dev *dev) { }
static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
static inline void pci_disable_device(struct pci_dev *dev) { }
static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; }