mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr()
When you enable CONFIG_OF_LIVE, you will end up with a lot of conversions. To help this tedious work, this commit converts devfdt_get_addr_ptr() to dev_read_addr_ptr() by coccinelle. I also removed redundant casts because dev_read_addr_ptr() returns an opaque pointer. To generate this commit, I ran the following semantic patch excluding include/dm/. <smpl> @@ type T; expression dev; @@ -(T *)devfdt_get_addr_ptr(dev) +dev_read_addr_ptr(dev) @@ expression dev; @@ -devfdt_get_addr_ptr(dev) +dev_read_addr_ptr(dev) </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Simon Glass
parent
1450bff3e4
commit
702e57e113
@@ -768,7 +768,7 @@ int designware_i2c_ofdata_to_platdata(struct udevice *bus)
|
||||
int ret;
|
||||
|
||||
if (!priv->regs)
|
||||
priv->regs = (struct i2c_regs *)devfdt_get_addr_ptr(bus);
|
||||
priv->regs = dev_read_addr_ptr(bus);
|
||||
dev_read_u32(bus, "i2c-scl-rising-time-ns", &priv->scl_rise_time_ns);
|
||||
dev_read_u32(bus, "i2c-scl-falling-time-ns", &priv->scl_fall_time_ns);
|
||||
dev_read_u32(bus, "i2c-sda-hold-time-ns", &priv->sda_hold_time_ns);
|
||||
|
Reference in New Issue
Block a user