lkml.org 
[lkml]   [2020]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/4] iio: vcnl4000: Factorize data reading and writing.
On Mon, Apr 20, 2020 at 11:43 AM Mathieu Othacehe <m.othacehe@gmail.com> wrote:
>
> Factorize data reading in vcnl4000_measure into a vcnl4000_read_block_data
> function. Use it to provide a vcnl4000_read_data function that is able to
> read sensor data under lock. Also add a vcnl4000_write_data function.

...

> + __be16 buf;
> + int ret;
> +
> + ret = i2c_smbus_read_i2c_block_data(data->client,

> + data_reg, sizeof(buf), (u8 *) &buf);

Why do you need casting?

> + if (ret < 0)
> + goto end;

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-04-21 02:37    [W:0.087 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site