diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-08 20:22:28 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-08 20:22:28 (GMT) |
commit | 106e7cf3bd3e8112d9f36fa8a94cb12042b15bec (patch) | |
tree | 0543af47df6296cf44b55db19e92abca9172be53 /drivers/staging/iio | |
parent | 19324328ad202b350c3803aa2bea65ff5f043d7f (diff) | |
parent | 5a2a6e1162d2c63b4bb3e6e3c867f0374e95cd1f (diff) | |
download | linux-106e7cf3bd3e8112d9f36fa8a94cb12042b15bec.tar.xz |
Merge branch 'work-next' into staging-next
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/industrialio-buffer.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c index 552e33f..a03a574 100644 --- a/drivers/staging/iio/industrialio-buffer.c +++ b/drivers/staging/iio/industrialio-buffer.c @@ -173,7 +173,7 @@ static ssize_t iio_scan_el_store(struct device *dev, error_ret: mutex_unlock(&indio_dev->mlock); - return ret ? ret : len; + return ret < 0 ? ret : len; } @@ -624,16 +624,8 @@ int iio_scan_mask_query(struct iio_dev *indio_dev, if (!buffer->scan_mask) return 0; - if (indio_dev->available_scan_masks) - mask = iio_scan_mask_match(indio_dev->available_scan_masks, - indio_dev->masklength, - buffer->scan_mask); - else - mask = buffer->scan_mask; - if (!mask) - return 0; - return test_bit(bit, mask); + return test_bit(bit, buffer->scan_mask); }; EXPORT_SYMBOL_GPL(iio_scan_mask_query); |