WSL2-Linux-Kernel/drivers/iio/gyro
Linus Walleij d8594fa22a iio: gyro: st_gyro: inline per-sensor data
We have #defines for all the individual sensor registers and
value/mask pairs #defined at the top of the file and used at
exactly one spot.

This is usually good if the #defines give a meaning to the
opaque magic numbers.

However in this case, the semantic meaning is inherent in the
name of the C99-addressable fields, and that means duplication
of information, and only makes the code hard to maintain since
you every time have to add a new #define AND update the site
where it is to be used.

Get rid of the #defines and just open code the values into the
appropriate struct elements. Make sure to explicitly address
the .hz and .value fields in the st_sensor_odr_avl struct
so that the meaning of all values is clear.

This patch is purely syntactic should have no semantic effect.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-12 15:38:09 +00:00
..
Kconfig iio: gyro: mpu3050: add I2C dependency 2016-11-08 20:29:33 +00:00
Makefile
adis16080.c
adis16130.c
adis16136.c
adis16260.c
adxrs450.c
bmg160.h
bmg160_core.c
bmg160_i2c.c
bmg160_spi.c
hid-sensor-gyro-3d.c
itg3200_buffer.c
itg3200_core.c
mpu3050-core.c
mpu3050-i2c.c
mpu3050.h
ssp_gyro_sensor.c
st_gyro.h
st_gyro_buffer.c
st_gyro_core.c iio: gyro: st_gyro: inline per-sensor data 2016-11-12 15:38:09 +00:00
st_gyro_i2c.c
st_gyro_spi.c