mmc: ca_dw_mmc: Misc cleanup of driver
[oweals/u-boot.git] / drivers / gpio / intel_broadwell_gpio.c
index 81ce446e1a162d1e2c624e657623b1fc96714963..95f8b2ba6cd9b282c52077efab261e5e7ef45dd8 100644 (file)
@@ -1,12 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2012 The Chromium OS Authors.
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pch.h>
 #include <pci.h>
 #include <syscon.h>
@@ -149,14 +150,14 @@ static int broadwell_gpio_ofdata_to_platdata(struct udevice *dev)
        if (ret)
                return ret;
 
-       bank = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "reg", -1);
+       bank = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", -1);
        if (bank == -1) {
                debug("%s: Invalid bank number %d\n", __func__, bank);
                return -EINVAL;
        }
        plat->bank = bank;
        plat->base_addr = gpiobase;
-       plat->bank_name = fdt_getprop(gd->fdt_blob, dev->of_offset,
+       plat->bank_name = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
                                      "bank-name", NULL);
 
        return 0;