Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281417
b: refs/heads/master
c: d4a6882
h: refs/heads/master
i:
  281415: 39f27c0
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Greg Kroah-Hartman committed Dec 22, 2011
1 parent 58ca432 commit 85eb6a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: 0ae3a912d8beabb2fd9bf81054b88aa8dc40feb5
refs/heads/master: d4a6882e1b9f01fa5bf7bb695081133121106dbb
5 changes: 2 additions & 3 deletions trunk/drivers/staging/iio/industrialio-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ ssize_t iio_buffer_store_enable(struct device *dev,
mutex_lock(&indio_dev->mlock);
previous_mode = indio_dev->currentmode;
requested_state = !(buf[0] == '0');
current_state = !!(previous_mode & INDIO_ALL_BUFFER_MODES);
current_state = iio_buffer_enabled(indio_dev);
if (current_state == requested_state) {
printk(KERN_INFO "iio-buffer, current state requested again\n");
goto done;
Expand Down Expand Up @@ -509,8 +509,7 @@ ssize_t iio_buffer_show_enable(struct device *dev,
char *buf)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
return sprintf(buf, "%d\n", !!(indio_dev->currentmode
& INDIO_ALL_BUFFER_MODES));
return sprintf(buf, "%d\n", iio_buffer_enabled(indio_dev));
}
EXPORT_SYMBOL(iio_buffer_show_enable);

Expand Down

0 comments on commit 85eb6a3

Please sign in to comment.