summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/ti_am335x_adc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 22:55:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 22:55:20 +0100
commit3d8bbe243dc7418b4b2eadcbf5693887d076a521 (patch)
tree80cb6e131441ded36bbbdd82ce2e9c526eaafb45 /drivers/iio/adc/ti_am335x_adc.c
parentbc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff)
parentc1b03ab5e886760bdd38c9c7a27af149046ffe01 (diff)
Merge tag 'iio-fixes-for-4.0c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: 3rd set of IIO fixes for the 4.0 cycle. * A double free occured on an error path in due to an event registration issue. The fix is the minimal change rather than possibly reworking this area of the core to give a more elegant solution (future work). * A number of drivers were directly accessing indio_dev->buffer->scan_mask to identify the currently enabled channel set. This may not be correct if we have additional clients on the push interface. The correct option is indio_dev->active_scan_mask. This is fixed. * bmc150 had incorrectly specified sampling frequency (a datasheet confusion as they are specified in terms of bandwith - e.g. half the sampling frequency). * hmc5843 wasn't setting it's name and hence the name attribute was returning an empty string. * inv_mpu6050 wasn't clearing the locally held timestamp buffer when the hardware fifo was reset. Also an inconsistency existed in the interface for the scale of the channels. Magic numbers were written but real ones were used for the reads. Now uses real numbers (i.e. not array indexes) for both. * fix a missing dependency in the dummy driver. Previously shielded from the autobuilders by an earlier build error.
Diffstat (limited to 'drivers/iio/adc/ti_am335x_adc.c')
-rw-r--r--drivers/iio/adc/ti_am335x_adc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index 2e5cc4409f78..a0e7161f040c 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -188,12 +188,11 @@ static int tiadc_buffer_preenable(struct iio_dev *indio_dev)
static int tiadc_buffer_postenable(struct iio_dev *indio_dev)
{
struct tiadc_device *adc_dev = iio_priv(indio_dev);
- struct iio_buffer *buffer = indio_dev->buffer;
unsigned int enb = 0;
u8 bit;
tiadc_step_config(indio_dev);
- for_each_set_bit(bit, buffer->scan_mask, adc_dev->channels)
+ for_each_set_bit(bit, indio_dev->active_scan_mask, adc_dev->channels)
enb |= (get_adc_step_bit(adc_dev, bit) << 1);
adc_dev->buffer_en_ch_steps = enb;