Commit fc0dccdd authored by Daniel Baluta's avatar Daniel Baluta Committed by Jonathan Cameron

iio: imu: inv_mpu6050: Fix alignment with open parenthesis

This makes code consistent around inv_mpu6050 driver and
fixes the following checkpatch.pl warning:
CHECK: Alignment should match open parenthesis

Note that there were few cases were it was not possible to
fix this due to making the line too long, but we can live with that.
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 371a7660
...@@ -217,11 +217,11 @@ static int inv_mpu6050_sensor_show(struct inv_mpu6050_state *st, int reg, ...@@ -217,11 +217,11 @@ static int inv_mpu6050_sensor_show(struct inv_mpu6050_state *st, int reg,
return IIO_VAL_INT; return IIO_VAL_INT;
} }
static int inv_mpu6050_read_raw(struct iio_dev *indio_dev, static int
inv_mpu6050_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, struct iio_chan_spec const *chan,
int *val, int *val, int *val2, long mask)
int *val2, {
long mask) {
struct inv_mpu6050_state *st = iio_priv(indio_dev); struct inv_mpu6050_state *st = iio_priv(indio_dev);
switch (mask) { switch (mask) {
...@@ -388,9 +388,8 @@ static int inv_mpu6050_write_accel_scale(struct inv_mpu6050_state *st, int val) ...@@ -388,9 +388,8 @@ static int inv_mpu6050_write_accel_scale(struct inv_mpu6050_state *st, int val)
static int inv_mpu6050_write_raw(struct iio_dev *indio_dev, static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, struct iio_chan_spec const *chan,
int val, int val, int val2, long mask)
int val2, {
long mask) {
struct inv_mpu6050_state *st = iio_priv(indio_dev); struct inv_mpu6050_state *st = iio_priv(indio_dev);
int result; int result;
...@@ -467,8 +466,9 @@ static int inv_mpu6050_set_lpf(struct inv_mpu6050_state *st, int rate) ...@@ -467,8 +466,9 @@ static int inv_mpu6050_set_lpf(struct inv_mpu6050_state *st, int rate)
/** /**
* inv_mpu6050_fifo_rate_store() - Set fifo rate. * inv_mpu6050_fifo_rate_store() - Set fifo rate.
*/ */
static ssize_t inv_mpu6050_fifo_rate_store(struct device *dev, static ssize_t
struct device_attribute *attr, const char *buf, size_t count) inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ {
s32 fifo_rate; s32 fifo_rate;
u8 d; u8 d;
...@@ -515,8 +515,9 @@ static ssize_t inv_mpu6050_fifo_rate_store(struct device *dev, ...@@ -515,8 +515,9 @@ static ssize_t inv_mpu6050_fifo_rate_store(struct device *dev,
/** /**
* inv_fifo_rate_show() - Get the current sampling rate. * inv_fifo_rate_show() - Get the current sampling rate.
*/ */
static ssize_t inv_fifo_rate_show(struct device *dev, static ssize_t
struct device_attribute *attr, char *buf) inv_fifo_rate_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ {
struct inv_mpu6050_state *st = iio_priv(dev_to_iio_dev(dev)); struct inv_mpu6050_state *st = iio_priv(dev_to_iio_dev(dev));
...@@ -527,8 +528,8 @@ static ssize_t inv_fifo_rate_show(struct device *dev, ...@@ -527,8 +528,8 @@ static ssize_t inv_fifo_rate_show(struct device *dev,
* inv_attr_show() - calling this function will show current * inv_attr_show() - calling this function will show current
* parameters. * parameters.
*/ */
static ssize_t inv_attr_show(struct device *dev, static ssize_t inv_attr_show(struct device *dev, struct device_attribute *attr,
struct device_attribute *attr, char *buf) char *buf)
{ {
struct inv_mpu6050_state *st = iio_priv(dev_to_iio_dev(dev)); struct inv_mpu6050_state *st = iio_priv(dev_to_iio_dev(dev));
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
......
...@@ -143,9 +143,8 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p) ...@@ -143,9 +143,8 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)
* read fifo_count register to know how many bytes inside FIFO * read fifo_count register to know how many bytes inside FIFO
* right now * right now
*/ */
result = regmap_bulk_read(st->map, result = regmap_bulk_read(st->map, st->reg->fifo_count_h, data,
st->reg->fifo_count_h, INV_MPU6050_FIFO_COUNT_BYTE);
data, INV_MPU6050_FIFO_COUNT_BYTE);
if (result) if (result)
goto end_session; goto end_session;
fifo_count = be16_to_cpup((__be16 *)(&data[0])); fifo_count = be16_to_cpup((__be16 *)(&data[0]));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment