Re: [PATCH 7/7] iio:common: make st_sensors_write_data_with_mask() inline

Jonathan Cameron
2019-06-22T10:50:04Z

On Mon, 17 Jun 2019 16:49:43 -0700
Denis Ciocca <denis.ciocca@st.com> wrote:

> Instead of changing all the references in the driver, let's make the
> function inline.
>
> Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Hmm. I suspect we'll pay the price for this bit of indirection at
some point. Perhaps a follow up series to remove this function entirely
in favour of direct call to the regmap equivalent?

Jonathan
> ---
> drivers/iio/common/st_sensors/st_sensors_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
> index 3ddab3ca0a4b..fe67349309de 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> @@ -26,7 +26,7 @@ static inline u32 st_sensors_get_unaligned_le24(const u8 *p)
> return (s32)((p[0] | p[1] << 8 | p[2] << 16) << 8) >> 8;
> }
>
> -int st_sensors_write_data_with_mask(struct iio_dev *indio_dev,
> +inline int st_sensors_write_data_with_mask(struct iio_dev *indio_dev,
> u8 reg_addr, u8 mask, u8 data)
> {
> struct st_sensor_data *sdata = iio_priv(indio_dev);