Hi Gunter,
A minor suggestion below.

On Thu, Aug 9, 2012 at 9:17 PM, Guenter Roeck <[email protected]> wrote:
> The master_xfer function returns 0 on success. It should return the number of
> successful transactions.
>
> Signed-off-by: Guenter Roeck <[email protected]>
> ---
>  drivers/i2c/busses/i2c-diolan-u2c.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c 
> b/drivers/i2c/busses/i2c-diolan-u2c.c
> index aedb94f..dae3ddf 100644
> --- a/drivers/i2c/busses/i2c-diolan-u2c.c
> +++ b/drivers/i2c/busses/i2c-diolan-u2c.c
> @@ -405,6 +405,7 @@ static int diolan_usb_xfer(struct i2c_adapter *adapter, 
> struct i2c_msg *msgs,
>                         }
>                 }
>         }
> +       ret = num;
So if all the messages get transferred this is right.

However if only a few go through should we return the number of
successful transactions
instead of error?

>  abort:
>         sret = diolan_i2c_stop(dev);
>         if (sret < 0 && ret >= 0)
> --
> 1.7.9.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to