diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-09-02 16:14:37 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 23:01:59 (GMT) |
commit | bd94c6a8a6d3499e857002b1f445162fba941029 (patch) | |
tree | f851384bb3c6c186c3ad28f78c7d044b37d016d6 /drivers/staging/iio/accel/sca3000_core.c | |
parent | 8310b86c3cd2f813bb9ed330447bcb2877b8328a (diff) | |
download | linux-bd94c6a8a6d3499e857002b1f445162fba941029.tar.xz |
staging:iio:various move default scan mask setting after ring register or remove
The scan mask will be dynamically assigned in register, so don't
use it before that.
In adis16260 I've moved it as I know this driver has userspace code.
Same for sca3000 where it is cost free due to hardware buffer.
Can do that for the others, but in theory userspace code should always
have been checking these and setting them appropriately anyway!
V2: Clear default mask out of adis16400 as reported by Michael
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/accel/sca3000_core.c')
-rw-r--r-- | drivers/staging/iio/accel/sca3000_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index 8281d66..3707acc 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c @@ -1161,6 +1161,12 @@ static int __devinit sca3000_probe(struct spi_device *spi) ARRAY_SIZE(sca3000_channels)); if (ret < 0) goto error_unregister_dev; + if (indio_dev->ring) { + iio_scan_mask_set(indio_dev->ring, 0); + iio_scan_mask_set(indio_dev->ring, 1); + iio_scan_mask_set(indio_dev->ring, 2); + } + if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) { ret = request_threaded_irq(spi->irq, NULL, |