diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-06-27 12:07:14 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 21:39:35 (GMT) |
commit | a22ff7066c0561c2aa92967f0eed4a1c77f088e7 (patch) | |
tree | 453f707c56df739b22d305f2b6fa66fd212b43e8 /drivers/staging/iio/accel/adis16240_ring.c | |
parent | 35212dfa6b13ab9a53f919d9ef22dd6ed363d485 (diff) | |
download | linux-fsl-qoriq-a22ff7066c0561c2aa92967f0eed4a1c77f088e7.tar.xz |
staging:iio:accel:adis16240 allocate tx and rx in state plus state via iio_priv
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/accel/adis16240_ring.c')
-rw-r--r-- | drivers/staging/iio/accel/adis16240_ring.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/iio/accel/adis16240_ring.c b/drivers/staging/iio/accel/adis16240_ring.c index 0c6d781..c812a34 100644 --- a/drivers/staging/iio/accel/adis16240_ring.c +++ b/drivers/staging/iio/accel/adis16240_ring.c @@ -26,7 +26,7 @@ static int adis16240_read_ring_data(struct device *dev, u8 *rx) { struct spi_message msg; struct iio_dev *indio_dev = dev_get_drvdata(dev); - struct adis16240_state *st = iio_dev_get_devdata(indio_dev); + struct adis16240_state *st = iio_priv(indio_dev); struct spi_transfer xfers[ADIS16240_OUTPUTS + 1]; int ret; int i; @@ -63,7 +63,7 @@ static irqreturn_t adis16240_trigger_handler(int irq, void *p) { struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->private_data; - struct adis16240_state *st = iio_dev_get_devdata(indio_dev); + struct adis16240_state *st = iio_priv(indio_dev); struct iio_ring_buffer *ring = indio_dev->ring; int i = 0; @@ -77,7 +77,7 @@ static irqreturn_t adis16240_trigger_handler(int irq, void *p) } if (ring->scan_count && - adis16240_read_ring_data(&st->indio_dev->dev, st->rx) >= 0) + adis16240_read_ring_data(&indio_dev->dev, st->rx) >= 0) for (; i < ring->scan_count; i++) data[i] = be16_to_cpup((__be16 *)&(st->rx[i*2])); @@ -87,7 +87,7 @@ static irqreturn_t adis16240_trigger_handler(int irq, void *p) ring->access->store_to(ring, (u8 *)data, pf->timestamp); - iio_trigger_notify_done(st->indio_dev->trig); + iio_trigger_notify_done(indio_dev->trig); kfree(data); return IRQ_HANDLED; |