return 0;
 }
 
-static int bcm2835_of_gpio_ranges_fallback(struct gpio_chip *gc,
-                                          struct device_node *np)
+static int bcm2835_add_pin_ranges_fallback(struct gpio_chip *gc)
 {
+       struct device_node *np = dev_of_node(gc->parent);
        struct pinctrl_dev *pctldev = of_pinctrl_get(np);
 
        if (!pctldev)
        .base = -1,
        .ngpio = BCM2835_NUM_GPIOS,
        .can_sleep = false,
-       .of_gpio_ranges_fallback = bcm2835_of_gpio_ranges_fallback,
+       .add_pin_ranges = bcm2835_add_pin_ranges_fallback,
 };
 
 static const struct gpio_chip bcm2711_gpio_chip = {
        .base = -1,
        .ngpio = BCM2711_NUM_GPIOS,
        .can_sleep = false,
-       .of_gpio_ranges_fallback = bcm2835_of_gpio_ranges_fallback,
+       .add_pin_ranges = bcm2835_add_pin_ranges_fallback,
 };
 
 static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc,