diff options
author | Jonathan Cameron <jic23@kernel.org> | 2012-04-21 10:09:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-24 11:23:37 -0700 |
commit | 420fe2e9471518f57a551d2114a54a0aa0c12ea3 (patch) | |
tree | a044ba17d35238d2f31ecc62d099bbaa3471f467 /drivers/staging/iio/accel/adis16203_ring.c | |
parent | f1264809eb7fe4227dc9fc47723b9bd44afc5641 (diff) | |
download | op-kernel-dev-420fe2e9471518f57a551d2114a54a0aa0c12ea3.zip op-kernel-dev-420fe2e9471518f57a551d2114a54a0aa0c12ea3.tar.gz |
staging:iio: add caching of the number of bytes in a scan.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/accel/adis16203_ring.c')
-rw-r--r-- | drivers/staging/iio/accel/adis16203_ring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/iio/accel/adis16203_ring.c b/drivers/staging/iio/accel/adis16203_ring.c index 6a8963d..86f4efb7 100644 --- a/drivers/staging/iio/accel/adis16203_ring.c +++ b/drivers/staging/iio/accel/adis16203_ring.c @@ -66,9 +66,8 @@ static irqreturn_t adis16203_trigger_handler(int irq, void *p) int i = 0; s16 *data; - size_t datasize = ring->access->get_bytes_per_datum(ring); - data = kmalloc(datasize, GFP_KERNEL); + data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); if (data == NULL) { dev_err(&st->us->dev, "memory alloc failed in ring bh"); return -ENOMEM; |