diff options
Diffstat (limited to 'drivers/staging/iio/accel/lis3l02dq_ring.c')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_ring.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 1a0651c..50c162e 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -69,25 +69,25 @@ static int lis3l02dq_read_all(struct iio_dev *indio_dev, u8 *rx_array) mutex_lock(&st->buf_lock); - for (i = 0; i < ARRAY_SIZE(read_all_tx_array)/4; i++) + for (i = 0; i < ARRAY_SIZE(read_all_tx_array) / 4; i++) if (test_bit(i, indio_dev->active_scan_mask)) { /* lower byte */ - xfers[j].tx_buf = st->tx + 2*j; - st->tx[2*j] = read_all_tx_array[i*4]; - st->tx[2*j + 1] = 0; + xfers[j].tx_buf = st->tx + (2 * j); + st->tx[2 * j] = read_all_tx_array[i * 4]; + st->tx[2 * j + 1] = 0; if (rx_array) - xfers[j].rx_buf = rx_array + j*2; + xfers[j].rx_buf = rx_array + (j * 2); xfers[j].bits_per_word = 8; xfers[j].len = 2; xfers[j].cs_change = 1; j++; /* upper byte */ - xfers[j].tx_buf = st->tx + 2*j; - st->tx[2*j] = read_all_tx_array[i*4 + 2]; - st->tx[2*j + 1] = 0; + xfers[j].tx_buf = st->tx + (2 * j); + st->tx[2 * j] = read_all_tx_array[i * 4 + 2]; + st->tx[2 * j + 1] = 0; if (rx_array) - xfers[j].rx_buf = rx_array + j*2; + xfers[j].rx_buf = rx_array + (j * 2); xfers[j].bits_per_word = 8; xfers[j].len = 2; xfers[j].cs_change = 1; @@ -127,11 +127,11 @@ static int lis3l02dq_get_buffer_element(struct iio_dev *indio_dev, return ret; } for (i = 0; i < scan_count; i++) - data[i] = combine_8_to_16(rx_array[i*4+1], - rx_array[i*4+3]); + data[i] = combine_8_to_16(rx_array[i * 4 + 1], + rx_array[i * 4 + 3]); kfree(rx_array); - return i*sizeof(data[0]); + return i * sizeof(data[0]); } static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p) |