Message ID | 20190617234943.10669-8-denis.ciocca@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iio:st_sensors: make use of regmap API | expand |
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);
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);
Instead of changing all the references in the driver, let's make the function inline. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> --- drivers/iio/common/st_sensors/st_sensors_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)