int na, ns;
char *name;
+ /* FIXME: Should use livetree */
na = fdt_address_cells(gd->fdt_blob, dev_of_offset(dev->parent));
if (na < 1) {
debug("bad #address-cells\n");
sprintf(name, "meson-gpio");
/* Create child device UCLASS_GPIO and bind it */
- device_bind(dev, priv->data->gpio_driver, name, NULL, gpio, &gpio_dev);
- dev_set_of_offset(gpio_dev, gpio);
+ device_bind(dev, priv->data->gpio_driver, name, NULL,
+ offset_to_ofnode(gpio), &gpio_dev);
return 0;
}