diff mbox series

[1/4] PCI: Add empty stub for pci_register_io_range()

Message ID 20210527194547.1287934-2-robh@kernel.org
State Accepted
Commit 00dcc7cf1a49f93efaa281cc85c88005995ecf63
Headers show
Series DT address cleanups and refactoring | expand

Commit Message

Rob Herring (Arm) May 27, 2021, 7:45 p.m. UTC
Add an empty stub for pci_register_io_range() when !CONFIG_PCI. It's needed
to convert of_pci_range_to_resource() to use IS_ENABLED(CONFIG_PCI).

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

---
 include/linux/pci.h | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.27.0

Comments

Bjorn Helgaas May 27, 2021, 9:55 p.m. UTC | #1
On Thu, May 27, 2021 at 02:45:44PM -0500, Rob Herring wrote:
> Add an empty stub for pci_register_io_range() when !CONFIG_PCI. It's needed

> to convert of_pci_range_to_resource() to use IS_ENABLED(CONFIG_PCI).

> 

> Cc: Bjorn Helgaas <bhelgaas@google.com>

> Cc: linux-pci@vger.kernel.org

> Signed-off-by: Rob Herring <robh@kernel.org>


Acked-by: Bjorn Helgaas <bhelgaas@google.com>


I assume you'll merge these through your tree.

> ---

>  include/linux/pci.h | 4 ++++

>  1 file changed, 4 insertions(+)

> 

> diff --git a/include/linux/pci.h b/include/linux/pci.h

> index c20211e59a57..29da7598f8d0 100644

> --- a/include/linux/pci.h

> +++ b/include/linux/pci.h

> @@ -1772,6 +1772,10 @@ static inline int pci_request_regions(struct pci_dev *dev, const char *res_name)

>  { return -EIO; }

>  static inline void pci_release_regions(struct pci_dev *dev) { }

>  

> +static inline int pci_register_io_range(struct fwnode_handle *fwnode,

> +					phys_addr_t addr, resource_size_t size)

> +{ return -EINVAL; }

> +

>  static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }

>  

>  static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)

> -- 

> 2.27.0

>
diff mbox series

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index c20211e59a57..29da7598f8d0 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1772,6 +1772,10 @@  static inline int pci_request_regions(struct pci_dev *dev, const char *res_name)
 { return -EIO; }
 static inline void pci_release_regions(struct pci_dev *dev) { }
 
+static inline int pci_register_io_range(struct fwnode_handle *fwnode,
+					phys_addr_t addr, resource_size_t size)
+{ return -EINVAL; }
+
 static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }
 
 static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)