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>
diff --git a/drivers/pci/pcie_phytium.c b/drivers/pci/pcie_phytium.c
index 92e281e..51b2171 100644
--- a/drivers/pci/pcie_phytium.c
+++ b/drivers/pci/pcie_phytium.c
@@ -75,9 +75,8 @@
* code. Otherwise the address to access will be written to the pointer pointed
* to by @paddress.
*/
-static int pci_phytium_conf_address(struct udevice *bus, pci_dev_t bdf,
- uint offset,
- void **paddress)
+static int pci_phytium_conf_address(const struct udevice *bus, pci_dev_t bdf,
+ uint offset, void **paddress)
{
struct phytium_pcie *pcie = dev_get_priv(bus);
void *addr;
@@ -119,7 +118,7 @@
* space of the device identified by the bus, device & function numbers in @bdf
* on the PCI bus @bus.
*/
-static int pci_phytium_read_config(struct udevice *bus, pci_dev_t bdf,
+static int pci_phytium_read_config(const struct udevice *bus, pci_dev_t bdf,
uint offset, ulong *valuep,
enum pci_size_t size)
{