Skip to content

Commit f68303c

Browse files
committed
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: Bjorn Helgaas <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 6ba5595 commit f68303c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/pci/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4163,7 +4163,7 @@ EXPORT_SYMBOL(pci_request_regions_exclusive);
41634163
* Record the PCI IO range (expressed as CPU physical address + size).
41644164
* Return a negative value if an error has occurred, zero otherwise
41654165
*/
4166-
int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
4166+
int pci_register_io_range(const struct fwnode_handle *fwnode, phys_addr_t addr,
41674167
resource_size_t size)
41684168
{
41694169
int ret = 0;

include/linux/pci.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
15561556
void *alignf_data);
15571557

15581558

1559-
int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
1559+
int pci_register_io_range(const struct fwnode_handle *fwnode, phys_addr_t addr,
15601560
resource_size_t size);
15611561
unsigned long pci_address_to_pio(phys_addr_t addr);
15621562
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)
20192019
{ return -EIO; }
20202020
static inline void pci_release_regions(struct pci_dev *dev) { }
20212021

2022-
static inline int pci_register_io_range(struct fwnode_handle *fwnode,
2022+
static inline int pci_register_io_range(const struct fwnode_handle *fwnode,
20232023
phys_addr_t addr, resource_size_t size)
20242024
{ return -EINVAL; }
20252025

0 commit comments

Comments
 (0)