diff options
author | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-11 10:41:07 +0300 |
---|---|---|
committer | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-04-13 08:17:18 +0300 |
commit | e09b41010ba33a20a87472ee821fa407a5b8da36 (patch) | |
tree | d10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/staging/iio/accel/lis3l02dq_ring.c | |
parent | f93b97fd65072de626c074dbe099a1fff05ce060 (diff) |
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page.
During the rebasing, the following patch collided:
Force tick interrupt and get rid of softirq magic(I70131fb85).
Collisions have been removed because its logic was found on the
source already.
Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769
Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/staging/iio/accel/lis3l02dq_ring.c')
-rw-r--r-- | kernel/drivers/staging/iio/accel/lis3l02dq_ring.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/kernel/drivers/staging/iio/accel/lis3l02dq_ring.c b/kernel/drivers/staging/iio/accel/lis3l02dq_ring.c index b892f2cf5..50c162e0c 100644 --- a/kernel/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/kernel/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) @@ -195,7 +195,8 @@ __lis3l02dq_write_data_ready_config(struct iio_dev *indio_dev, bool state) /* Enable requested */ } else if (state && !currentlyset) { /* If not set, enable requested - * first disable all events */ + * first disable all events + */ ret = lis3l02dq_disable_all_events(indio_dev); if (ret < 0) goto error_ret; @@ -255,7 +256,8 @@ static int lis3l02dq_trig_try_reen(struct iio_trigger *trig) int i; /* If gpio still high (or high again) - * In theory possible we will need to do this several times */ + * In theory possible we will need to do this several times + */ for (i = 0; i < 5; i++) if (gpio_get_value(st->gpio)) lis3l02dq_read_all(indio_dev, NULL); |