dm: core: Update device_bind_driver_to_node() to use ofnode
[oweals/u-boot.git] / drivers / i2c / s3c24x0_i2c.c
index 363cd04e4e2692899b63bad0bbe46613861b6371..06fe0a51f3dbb2a4d1c4b66c58e1a9d492427df4 100644 (file)
@@ -312,9 +312,9 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
        struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev);
        int node;
 
-       node = dev->of_offset;
+       node = dev_of_offset(dev);
 
-       i2c_bus->regs = (struct s3c24x0_i2c *)dev_get_addr(dev);
+       i2c_bus->regs = (struct s3c24x0_i2c *)devfdt_get_addr(dev);
 
        i2c_bus->id = pinmux_decode_periph_id(blob, node);