[i2c] [PATCH 1/3] I2C: DaVinci: move dev_debug line for more output

Jean Delvare khali at linux-fr.org
Fri May 2 15:46:59 CEST 2008


On Wed, 30 Apr 2008 16:53:56 -0700, Troy Kisky wrote:
> Previously the dev_dbg only printed if no error.
> Printing also on an error is more useful
> 
> Signed-off-by: Troy Kisky <troy.kisky at boundarydevices.com>
> Signed-off-by: Kevin Hilman <khilman at mvista.com>
> ---
>  drivers/i2c/busses/i2c-davinci.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 7a60afb..fd97cca 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -341,12 +341,10 @@ 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;
>  }
>  

Applied (after folding the long line), thanks.

-- 
Jean Delvare



More information about the i2c mailing list