summaryrefslogtreecommitdiff
path: root/drivers/pci/pci_sh7751.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-01-27 08:49:37 -0700
committerSimon Glass <sjg@chromium.org>2020-02-05 19:33:45 -0700
commitc4e72c4ad8b7c2db9c868bd053c25344b95900b8 (patch)
treefd7f628f007e60b6a9f69d94b14421ffe226ae27 /drivers/pci/pci_sh7751.c
parentfc347fbdd44a01b1aba6283dec56c1374baca383 (diff)
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/pci_sh7751.c')
-rw-r--r--drivers/pci/pci_sh7751.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci_sh7751.c b/drivers/pci/pci_sh7751.c
index 53e1668c99..2f48b96719 100644
--- a/drivers/pci/pci_sh7751.c
+++ b/drivers/pci/pci_sh7751.c
@@ -80,12 +80,12 @@ static int sh7751_pci_addr_valid(pci_dev_t d, uint offset)
return 0;
}
-static u32 get_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset)
+static u32 get_bus_address(const struct udevice *dev, pci_dev_t bdf, u32 offset)
{
return BIT(31) | (PCI_DEV(bdf) << 8) | (offset & ~3);
}
-static int sh7751_pci_read_config(struct udevice *dev, pci_dev_t bdf,
+static int sh7751_pci_read_config(const struct udevice *dev, pci_dev_t bdf,
uint offset, ulong *value,
enum pci_size_t size)
{