Merge git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / drivers / gpio / mxc_gpio.c
index 0eb6c600f1ef4f446c4280becdb05870f6544f1b..c480eba9407a40c89575b72b94e0b2c4d01140c5 100644 (file)
@@ -304,13 +304,18 @@ static int mxc_gpio_bind(struct udevice *dev)
 
        addr = devfdt_get_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
-               return -ENODEV;
+               return -EINVAL;
 
        /*
         * TODO:
         * When every board is converted to driver model and DT is supported,
         * this can be done by auto-alloc feature, but not using calloc
         * to alloc memory for platdata.
+        *
+        * For example mxc_plat below uses platform data rather than device
+        * tree.
+        *
+        * NOTE: DO NOT COPY this code if you are using device tree.
         */
        plat = calloc(1, sizeof(*plat));
        if (!plat)