dm: Use dev_get_addr() where possible
[oweals/u-boot.git] / drivers / i2c / s3c24x0_i2c.c
index ae6f436385a616479db3096256613657c3d14665..dc9b661c1cf754632cc7d673c024f860332e60b4 100644 (file)
@@ -1397,12 +1397,10 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
 
        if (i2c_bus->is_highspeed) {
                flags = PINMUX_FLAG_HS_MODE;
-               i2c_bus->hsregs = (struct exynos5_hsi2c *)
-                               fdtdec_get_addr(blob, node, "reg");
+               i2c_bus->hsregs = (struct exynos5_hsi2c *)dev_get_addr(dev);
        } else {
                flags = 0;
-               i2c_bus->regs = (struct s3c24x0_i2c *)
-                               fdtdec_get_addr(blob, node, "reg");
+               i2c_bus->regs = (struct s3c24x0_i2c *)dev_get_addr(dev);
        }
 
        i2c_bus->id = pinmux_decode_periph_id(blob, node);