diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-27 08:49:37 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-05 19:33:45 -0700 |
commit | c4e72c4ad8b7c2db9c868bd053c25344b95900b8 (patch) | |
tree | fd7f628f007e60b6a9f69d94b14421ffe226ae27 /drivers/pci/pcie_ecam_generic.c | |
parent | fc347fbdd44a01b1aba6283dec56c1374baca383 (diff) | |
download | u-boot-c4e72c4ad8b7c2db9c868bd053c25344b95900b8.tar.gz |
dm: pci: Update the PCI read_config() method to const dev *
At present this method uses a non-const udevice pointer, but the call
should not modify the device. Use a const pointer.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pci/pcie_ecam_generic.c')
-rw-r--r-- | drivers/pci/pcie_ecam_generic.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pci/pcie_ecam_generic.c b/drivers/pci/pcie_ecam_generic.c index 00644edd26..c875f3a5b7 100644 --- a/drivers/pci/pcie_ecam_generic.c +++ b/drivers/pci/pcie_ecam_generic.c @@ -35,8 +35,9 @@ struct generic_ecam_pcie { * code. Otherwise the address to access will be written to the pointer pointed * to by @paddress. */ -static int pci_generic_ecam_conf_address(struct udevice *bus, pci_dev_t bdf, - uint offset, void **paddress) +static int pci_generic_ecam_conf_address(const struct udevice *bus, + pci_dev_t bdf, uint offset, + void **paddress) { struct generic_ecam_pcie *pcie = dev_get_priv(bus); void *addr; @@ -63,9 +64,9 @@ static int pci_generic_ecam_conf_address(struct udevice *bus, pci_dev_t bdf, * space of the device identified by the bus, device & function numbers in @bdf * on the PCI bus @bus. */ -static int pci_generic_ecam_read_config(struct udevice *bus, pci_dev_t bdf, - uint offset, ulong *valuep, - enum pci_size_t size) +static int pci_generic_ecam_read_config(const struct udevice *bus, + pci_dev_t bdf, uint offset, + ulong *valuep, enum pci_size_t size) { return pci_generic_mmap_read_config(bus, pci_generic_ecam_conf_address, bdf, offset, valuep, size); |