summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2019-02-21 18:02:54 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-04-04 20:19:48 +0100
commit28799ceac014a1a349e0371f5dec136bccf72fb7 (patch)
tree18c829fa474ebaa80672f61d7b368d8db2c6c220 /drivers/iio
parent8d7ea73814b4ede8bdf31021779e1345bee15acc (diff)
iio: mpu6050: improve code readability
- use temporary variable in get_mount_matrix() - remove , after { } Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
index 069219804334..6138a6d86afb 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
@@ -796,12 +796,14 @@ static const struct iio_mount_matrix *
inv_get_mount_matrix(const struct iio_dev *indio_dev,
const struct iio_chan_spec *chan)
{
- return &((struct inv_mpu6050_state *)iio_priv(indio_dev))->orientation;
+ struct inv_mpu6050_state *data = iio_priv(indio_dev);
+
+ return &data->orientation;
}
static const struct iio_chan_spec_ext_info inv_ext_info[] = {
IIO_MOUNT_MATRIX(IIO_SHARED_BY_TYPE, inv_get_mount_matrix),
- { },
+ { }
};
#define INV_MPU6050_CHAN(_type, _channel2, _index) \