Commit f68303cf authored by Rob Herring (Arm)'s avatar Rob Herring (Arm)
Browse files

PCI: Constify pci_register_io_range() fwnode_handle



pci_register_io_range() does not modify the passed in fwnode_handle, so
make it const.

Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20241010-dt-const-v1-1-87a51f558425@kernel.org


Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent 6ba55951
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4163,7 +4163,7 @@ EXPORT_SYMBOL(pci_request_regions_exclusive);
 * Record the PCI IO range (expressed as CPU physical address + size).
 * Return a negative value if an error has occurred, zero otherwise
 */
int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
int pci_register_io_range(const struct fwnode_handle *fwnode, phys_addr_t addr,
			resource_size_t	size)
{
	int ret = 0;
+2 −2
Original line number Diff line number Diff line
@@ -1556,7 +1556,7 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
			void *alignf_data);


int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
int pci_register_io_range(const struct fwnode_handle *fwnode, phys_addr_t addr,
			resource_size_t size);
unsigned long pci_address_to_pio(phys_addr_t addr);
phys_addr_t pci_pio_to_address(unsigned long pio);
@@ -2019,7 +2019,7 @@ 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,
static inline int pci_register_io_range(const struct fwnode_handle *fwnode,
					phys_addr_t addr, resource_size_t size)
{ return -EINVAL; }