diff options
Diffstat (limited to 'drivers/staging/iio/accel')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq.h | 15 | ||||
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_core.c | 4 | ||||
-rw-r--r-- | drivers/staging/iio/accel/sca3000_core.c | 3 | ||||
-rw-r--r-- | drivers/staging/iio/accel/sca3000_ring.c | 3 |
4 files changed, 14 insertions, 11 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq.h b/drivers/staging/iio/accel/lis3l02dq.h index 3f24c629b..6bd3d4d5b 100644 --- a/drivers/staging/iio/accel/lis3l02dq.h +++ b/drivers/staging/iio/accel/lis3l02dq.h @@ -67,7 +67,8 @@ #define LIS3L02DQ_REG_CTRL_2_THREE_WIRE_SPI_MODE 0x02 /* Data alignment, default is 12 bit right justified - * - option for 16 bit left justified */ + * - option for 16 bit left justified + */ #define LIS3L02DQ_REG_CTRL_2_DATA_ALIGNMENT_16_BIT_LEFT_JUSTIFIED 0x01 /* Interrupt related stuff */ @@ -77,7 +78,8 @@ #define LIS3L02DQ_REG_WAKE_UP_CFG_BOOLEAN_AND 0x80 /* Latch interrupt request, - * if on ack must be given by reading the ack register */ + * if on ack must be given by reading the ack register + */ #define LIS3L02DQ_REG_WAKE_UP_CFG_LATCH_SRC 0x40 /* Z Interrupt on High (above threshold) */ @@ -94,7 +96,8 @@ #define LIS3L02DQ_REG_WAKE_UP_CFG_INTERRUPT_X_LOW 0x01 /* Register that gives description of what caused interrupt - * - latched if set in CFG_ADDRES */ + * - latched if set in CFG_ADDRES + */ #define LIS3L02DQ_REG_WAKE_UP_SRC_ADDR 0x24 /* top bit ignored */ /* Interrupt Active */ @@ -123,7 +126,8 @@ #define LIS3L02DQ_REG_STATUS_X_NEW_DATA 0x01 /* The accelerometer readings - low and high bytes. - * Form of high byte dependent on justification set in ctrl reg */ + * Form of high byte dependent on justification set in ctrl reg + */ #define LIS3L02DQ_REG_OUT_X_L_ADDR 0x28 #define LIS3L02DQ_REG_OUT_X_H_ADDR 0x29 #define LIS3L02DQ_REG_OUT_Y_L_ADDR 0x2A @@ -132,7 +136,8 @@ #define LIS3L02DQ_REG_OUT_Z_H_ADDR 0x2D /* Threshold values for all axes and both above and below thresholds - * - i.e. there is only one value */ + * - i.e. there is only one value + */ #define LIS3L02DQ_REG_THS_L_ADDR 0x2E #define LIS3L02DQ_REG_THS_H_ADDR 0x2F diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index 7939ae637..7a6fed3f2 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c @@ -567,7 +567,7 @@ static int lis3l02dq_read_event_config(struct iio_dev *indio_dev, { u8 val; int ret; - u8 mask = (1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING))); + u8 mask = 1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING)); ret = lis3l02dq_spi_read_reg_8(indio_dev, LIS3L02DQ_REG_WAKE_UP_CFG_ADDR, @@ -622,7 +622,7 @@ static int lis3l02dq_write_event_config(struct iio_dev *indio_dev, u8 val, control; u8 currentlyset; bool changed = false; - u8 mask = (1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING))); + u8 mask = 1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING)); mutex_lock(&indio_dev->mlock); /* read current control */ diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index 02e930c55..a8f533af9 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c @@ -216,8 +216,7 @@ static int sca3000_read_ctrl_reg(struct sca3000_state *st, ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_CTRL_DATA, 1); if (ret) goto error_ret; - else - return st->rx[0]; + return st->rx[0]; error_ret: return ret; } diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c index 1920dc60c..d1cb9b9cf 100644 --- a/drivers/staging/iio/accel/sca3000_ring.c +++ b/drivers/staging/iio/accel/sca3000_ring.c @@ -99,8 +99,7 @@ static int sca3000_read_first_n_hw_rb(struct iio_buffer *r, ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_BUF_COUNT, 1); if (ret) goto error_ret; - else - num_available = st->rx[0]; + num_available = st->rx[0]; /* * num_available is the total number of samples available * i.e. number of time points * number of channels. |