Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304425
b: refs/heads/master
c: a714af2
h: refs/heads/master
i:
  304423: ddb4f01
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Apr 24, 2012
1 parent d406116 commit f8567f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 1f9e349460389963838aa5428425e7dc31000af6
refs/heads/master: a714af276f5002b44e97a2d6d03f85bdae627c41
13 changes: 9 additions & 4 deletions trunk/drivers/staging/iio/industrialio-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ static ssize_t iio_scan_el_store(struct device *dev,
const char *buf,
size_t len)
{
int ret = 0;
int ret;
bool state;
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct iio_buffer *buffer = indio_dev->buffer;
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);

state = !(buf[0] == '0');
ret = strtobool(buf, &state);
if (ret < 0)
return ret;
mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev)) {
ret = -EBUSY;
Expand Down Expand Up @@ -169,11 +171,14 @@ static ssize_t iio_scan_el_ts_store(struct device *dev,
const char *buf,
size_t len)
{
int ret = 0;
int ret;
struct iio_dev *indio_dev = dev_get_drvdata(dev);
bool state;

state = !(buf[0] == '0');
ret = strtobool(buf, &state);
if (ret < 0)
return ret;

mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev)) {
ret = -EBUSY;
Expand Down

0 comments on commit f8567f3

Please sign in to comment.