summaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-11-09 16:09:58 +0100
committerJonathan Cameron <jic23@kernel.org>2016-11-12 16:38:09 +0100
commitd8594fa22a3f7c294639d9aa2959d63e66d9437c (patch)
tree37a3b0b5ce5c19b54ba693dcc3839755cc51304b /drivers/iio/magnetometer
parentiio: imu: inv_mpu6050: inform the i2c mux core about how it is used (diff)
downloadlinux-d8594fa22a3f7c294639d9aa2959d63e66d9437c.tar.xz
linux-d8594fa22a3f7c294639d9aa2959d63e66d9437c.zip
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>
Diffstat (limited to 'drivers/iio/magnetometer')
0 files changed, 0 insertions, 0 deletions