Merge tag 'v2021.01-rc5' into next
[platform/kernel/u-boot.git] / drivers / pinctrl / meson / pinctrl-meson.c
index 5065b62..b11a40e 100644 (file)
@@ -347,6 +347,7 @@ int meson_pinctrl_probe(struct udevice *dev)
        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");
@@ -419,8 +420,8 @@ int meson_pinctrl_probe(struct udevice *dev)
        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;
 }