diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2021-09-12 11:15:11 +0800 |
---|---|---|
committer | Leo Yu-Chi Liang <ycliang@andestech.com> | 2021-10-20 10:59:09 +0800 |
commit | 7e22c85918e68e6df50d01d08585f88fbbaf3456 (patch) | |
tree | 1378d68ddda9780d5c056d69e3ea6a03b8c21fe4 /drivers | |
parent | d710c7e84187088cb157ab4131ca50a1236a931a (diff) | |
download | u-boot-7e22c85918e68e6df50d01d08585f88fbbaf3456.tar.gz u-boot-7e22c85918e68e6df50d01d08585f88fbbaf3456.tar.bz2 u-boot-7e22c85918e68e6df50d01d08585f88fbbaf3456.zip |
i2c: ocores: Fix -Wint-to-pointer-cast warning
The following warning is seen in ocores_i2c.c in a 32-bit build:
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Change to use dev_read_addr_ptr().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/ocores_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/ocores_i2c.c b/drivers/i2c/ocores_i2c.c index f129ec3818..3b19ba78fa 100644 --- a/drivers/i2c/ocores_i2c.c +++ b/drivers/i2c/ocores_i2c.c @@ -516,7 +516,7 @@ static int ocores_i2c_probe(struct udevice *dev) u32 clock_frequency_khz; int ret; - bus->base = (void __iomem *)devfdt_get_addr(dev); + bus->base = dev_read_addr_ptr(dev); if (dev_read_u32(dev, "reg-shift", &bus->reg_shift)) { /* no 'reg-shift', check for deprecated 'regstep' */ |