aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
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/misc
parentfc347fbdd44a01b1aba6283dec56c1374baca383 (diff)
downloadu-boot-c4e72c4ad8b7c2db9c868bd053c25344b95900b8.zip
u-boot-c4e72c4ad8b7c2db9c868bd053c25344b95900b8.tar.gz
u-boot-c4e72c4ad8b7c2db9c868bd053c25344b95900b8.tar.bz2
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/misc')
-rw-r--r--drivers/misc/p2sb_emul.c5
-rw-r--r--drivers/misc/swap_case.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c
index c3795c5..a6ee9a2 100644
--- a/drivers/misc/p2sb_emul.c
+++ b/drivers/misc/p2sb_emul.c
@@ -48,8 +48,9 @@ struct p2sb_emul_priv {
u8 regs[16];
};
-static int sandbox_p2sb_emul_read_config(struct udevice *emul, uint offset,
- ulong *valuep, enum pci_size_t size)
+static int sandbox_p2sb_emul_read_config(const struct udevice *emul,
+ uint offset, ulong *valuep,
+ enum pci_size_t size)
{
struct p2sb_emul_platdata *plat = dev_get_platdata(emul);
diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index 11189d1..97e2afa 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -51,7 +51,7 @@ struct swap_case_priv {
char mem_text[MEM_TEXT_SIZE];
};
-static int sandbox_swap_case_use_ea(struct udevice *dev)
+static int sandbox_swap_case_use_ea(const struct udevice *dev)
{
return !!ofnode_get_property(dev->node, "use-ea", NULL);
}
@@ -82,7 +82,7 @@ static const u32 ea_regs[] = {
PCI_CAP_EA_SIZE_HI,
};
-static int sandbox_swap_case_read_ea(struct udevice *emul, uint offset,
+static int sandbox_swap_case_read_ea(const struct udevice *emul, uint offset,
ulong *valuep, enum pci_size_t size)
{
u32 reg;
@@ -95,8 +95,9 @@ static int sandbox_swap_case_read_ea(struct udevice *emul, uint offset,
return 0;
}
-static int sandbox_swap_case_read_config(struct udevice *emul, uint offset,
- ulong *valuep, enum pci_size_t size)
+static int sandbox_swap_case_read_config(const struct udevice *emul,
+ uint offset, ulong *valuep,
+ enum pci_size_t size)
{
struct swap_case_platdata *plat = dev_get_platdata(emul);