Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281261
b: refs/heads/master
c: 9380d5e
h: refs/heads/master
i:
  281259: bfd8076
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent 1d42275 commit 491416e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78c32ed39e26ef3a65d94072c9a845eefe84d4d9
refs/heads/master: 9380d5ed36268432322fdd50c10bf0eb466b700a
1 change: 0 additions & 1 deletion trunk/drivers/staging/iio/adc/ad7606.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ enum ad7606_supported_device_ids {
ID_AD7606_4
};

int ad7606_scan_from_ring(struct iio_dev *indio_dev, unsigned ch);
int ad7606_register_ring_funcs_and_init(struct iio_dev *indio_dev);
void ad7606_ring_cleanup(struct iio_dev *indio_dev);
#endif /* IIO_ADC_AD7606_H_ */
2 changes: 1 addition & 1 deletion trunk/drivers/staging/iio/adc/ad7606_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static int ad7606_read_raw(struct iio_dev *indio_dev,
case 0:
mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev))
ret = ad7606_scan_from_ring(indio_dev, chan->address);
ret = -EBUSY;
else
ret = ad7606_scan_direct(indio_dev, chan->address);
mutex_unlock(&indio_dev->mlock);
Expand Down
24 changes: 0 additions & 24 deletions trunk/drivers/staging/iio/adc/ad7606_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,6 @@

#include "ad7606.h"

int ad7606_scan_from_ring(struct iio_dev *indio_dev, unsigned ch)
{
struct iio_buffer *ring = indio_dev->buffer;
int ret;
u16 *ring_data;

ring_data = kmalloc(ring->access->get_bytes_per_datum(ring),
GFP_KERNEL);
if (ring_data == NULL) {
ret = -ENOMEM;
goto error_ret;
}
ret = ring->access->read_last(ring, (u8 *) ring_data);
if (ret)
goto error_free_ring_data;

ret = ring_data[ch];

error_free_ring_data:
kfree(ring_data);
error_ret:
return ret;
}

/**
* ad7606_trigger_handler_th() th/bh of trigger launched polling to ring buffer
*
Expand Down

0 comments on commit 491416e

Please sign in to comment.