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>
This commit is contained in:
H. Nikolaus Schaller 2019-02-21 18:02:54 +01:00 committed by Jonathan Cameron
parent 8d7ea73814
commit 28799ceac0

View File

@ -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) \