]> git.sur5r.net Git - u-boot/blobdiff - drivers/i2c/tegra186_bpmp_i2c.c
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[u-boot] / drivers / i2c / tegra186_bpmp_i2c.c
index 513c414ae38aed82fb7aaab6ff0e44288d89b496..b4fff43269889fec6d52e64eb089e314726a72e3 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2016, NVIDIA CORPORATION.
- *
- * SPDX-License-Identifier: GPL-2.0
  */
 
 #include <common.h>
@@ -90,11 +89,11 @@ static int tegra186_bpmp_i2c_probe(struct udevice *dev)
 {
        struct tegra186_bpmp_i2c *priv = dev_get_priv(dev);
 
-       priv->bpmp_bus_id = fdtdec_get_uint(gd->fdt_blob, dev->of_offset,
+       priv->bpmp_bus_id = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
                                            "nvidia,bpmp-bus-id", U32_MAX);
        if (priv->bpmp_bus_id == U32_MAX) {
                debug("%s: could not parse nvidia,bpmp-bus-id\n", __func__);
-               return -ENODEV;
+               return -EINVAL;
        }
 
        return 0;