Need stub functions in order to be able to compile ACPI without PCI support. Signed-off-by: Sinan Kaya <okaya@xxxxxxxxxx> --- include/linux/pci.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index 11c71c4ecf75..15407f469d41 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -682,10 +682,22 @@ struct pci_ops { * ACPI needs to be able to access PCI config space before we've done a * PCI bus scan and created pci_bus structures. */ +#ifdef CONFIG_PCI int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *val); int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 val); +#else +static inline int raw_pci_read(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *val) +{ + *val = 0; + return -EINVAL; +} +static inline int raw_pci_write(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 val) +{ return -EINVAL; } +#endif #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT typedef u64 pci_bus_addr_t; @@ -1599,7 +1611,27 @@ pci_release_mem_regions(struct pci_dev *pdev) } #else /* CONFIG_PCI is not enabled */ +static inline int pci_bus_read_config_byte(struct pci_bus *bus, + unsigned int devfn, int where, u8 *val) +{ return -EINVAL; } +static inline int pci_bus_read_config_word(struct pci_bus *bus, + unsigned int devfn, int where, u16 *val) +{ return -EINVAL; } +static inline int pci_bus_read_config_dword(struct pci_bus *bus, + unsigned int devfn, int where, u32 *val) +{ return -EINVAL; } +static inline int pci_bus_write_config_byte(struct pci_bus *bus, + unsigned int devfn, int where, u8 val) +{ return -EINVAL; } +static inline int pci_bus_write_config_word(struct pci_bus *bus, + unsigned int devfn, int where, u16 val) +{ return -EINVAL; } +static inline int pci_bus_write_config_dword(struct pci_bus *bus, + unsigned int devfn, int where, u32 val) +{ return -EINVAL; } +static inline struct pci_bus *pci_find_bus(int domain, int busnr) +{ return NULL; } static inline void pci_set_flags(int flags) { } static inline void pci_add_flags(int flags) { } static inline void pci_clear_flags(int flags) { } -- 2.19.0