On Fri, 21 Oct 2011 11:13:29 +0100, Jonathan Cameron wrote:
> Function ensures that error codes don't get mangled.
> Dependant on:
> i2c: boilerplate function for byte swapped  smbus_write/read_word_data
> which is working it's way through the i2c tree.
> 
> Signed-off-by: Jonathan Cameron <ji...@cam.ac.uk>
> ---
> 
> In some cases the now largely pointless boiler plate functions
> could be squished.
> 
> patch based on 3.1-rc10
> 
>  drivers/media/video/mt9m001.c |    6 +++---
>  drivers/media/video/mt9m111.c |    7 +++----
>  drivers/media/video/mt9t031.c |    5 ++---
>  drivers/media/video/mt9v022.c |    5 ++---
>  drivers/media/video/mt9v032.c |    8 ++++----
>  5 files changed, 14 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
> index 4da9cca..7493d9e 100644
> --- a/drivers/media/video/mt9m001.c
> +++ b/drivers/media/video/mt9m001.c
> @@ -102,14 +102,14 @@ static struct mt9m001 *to_mt9m001(const struct 
> i2c_client *client)
>  
>  static int reg_read(struct i2c_client *client, const u8 reg)
>  {
> -     s32 data = i2c_smbus_read_word_data(client, reg);
> -     return data < 0 ? data : swab16(data);
> +     return i2c_smbus_read_word_swapped(client, reg);
> +

Stray blank line.

>  }
>  (...)

Other than this, looks all OK:

Acked-by: Jean Delvare <kh...@linux-fr.org>

Obviously depends on the i2c patch, which will go upstream during the
next merge window.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to