colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / drivers / gpio / lpc32xx_gpio.c
index 9674ee75f03185eca01bc5d942ba7acd6a011f01..1265ee41a60bc129e330bb002818d10dd3d655cd 100644 (file)
@@ -1,12 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * LPC32xxGPIO driver
  *
  * (C) Copyright 2014  DENX Software Engineering GmbH
  * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr>
- *
- * 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 +297,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;
        }