mirror of https://gitee.com/openkylin/linux.git
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:
parent
8d7ea73814
commit
28799ceac0
|
@ -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) \
|
||||
|
|
Loading…
Reference in New Issue