]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
i2c-davinci: Move dev_dbg statement for more output
authorTroy Kisky <troy.kisky@boundarydevices.com>
Mon, 14 Jul 2008 20:38:20 +0000 (22:38 +0200)
committerJean Delvare <khali@mahadeva.delvare>
Mon, 14 Jul 2008 20:38:20 +0000 (22:38 +0200)
Previously the dev_dbg only printed if no error.
Printing also on an error is more useful

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-davinci.c

index 7fdbca17d4a8f44e48a7a8a5d79a0f890267c593..85097fdc75e4c7532785eef2251a095955fd4e9a 100644 (file)
@@ -345,12 +345,11 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
        for (i = 0; i < num; i++) {
                ret = i2c_davinci_xfer_msg(adap, &msgs[i], (i == (num - 1)));
+               dev_dbg(dev->dev, "%s [%d/%d] ret: %d\n", __func__, i + 1, num,
+                       ret);
                if (ret < 0)
                        return ret;
        }
-
-       dev_dbg(dev->dev, "%s:%d ret: %d\n", __func__, __LINE__, ret);
-
        return num;
 }