]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: core: Use debug() instead of printf() for failures
authorSimon Glass <sjg@chromium.org>
Tue, 23 Jun 2015 21:38:36 +0000 (15:38 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 21 Jul 2015 23:39:22 +0000 (17:39 -0600)
To avoid bloating SPL code, use debug() where possible in the driver model
core code. The error code is already returned, and can be investigated as
needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/lists.c

index 0c49d99f47edce622ee70df459191746ae1ee789..2e52500ef25c7ee145c22240cae67356b212bf99 100644 (file)
@@ -86,13 +86,13 @@ int device_bind_driver_to_node(struct udevice *parent, const char *drv_name,
 
        drv = lists_driver_lookup_name(drv_name);
        if (!drv) {
-               printf("Cannot find driver '%s'\n", drv_name);
+               debug("Cannot find driver '%s'\n", drv_name);
                return -ENOENT;
        }
        ret = device_bind(parent, drv, dev_name, NULL, node, devp);
        if (ret) {
-               printf("Cannot create device named '%s' (err=%d)\n",
-                      dev_name, ret);
+               debug("Cannot create device named '%s' (err=%d)\n",
+                     dev_name, ret);
                return ret;
        }