]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/gpio/lpc32xx_gpio.c
Merge git://git.denx.de/u-boot-sunxi
[people/ms/u-boot.git] / drivers / gpio / lpc32xx_gpio.c
index 9674ee75f03185eca01bc5d942ba7acd6a011f01..292fc74fc396f495583a944459ae21d14c510c2e 100644 (file)
@@ -7,6 +7,7 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#include <common.h>
 #include <asm/io.h>
 #include <asm/arch-lpc32xx/cpu.h>
 #include <asm/arch-lpc32xx/gpio.h>
@@ -297,7 +298,7 @@ static int lpc32xx_gpio_probe(struct udevice *dev)
        struct lpc32xx_gpio_priv *gpio_priv = dev_get_priv(dev);
        struct gpio_dev_priv *uc_priv = dev->uclass_priv;
 
-       if (dev->of_offset == -1) {
+       if (dev_of_offset(dev) == -1) {
                /* Tell the uclass how many GPIOs we have */
                uc_priv->gpio_count = LPC32XX_GPIOS;
        }