Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289177
b: refs/heads/master
c: 0f1acee
h: refs/heads/master
i:
  289175: 81ef362
v: v3
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Mar 3, 2012
1 parent 4ff6e6b commit 87b0bad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e553f182d55bd268fea3f106368e2344141c212a
refs/heads/master: 0f1acee5f5e2ceaef3244dc4c1f3895b907669cd
6 changes: 6 additions & 0 deletions trunk/drivers/staging/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,8 @@ static const struct file_operations iio_buffer_fileops = {
.compat_ioctl = iio_ioctl,
};

static const struct iio_buffer_setup_ops noop_ring_setup_ops;

int iio_device_register(struct iio_dev *indio_dev)
{
int ret;
Expand Down Expand Up @@ -882,6 +884,10 @@ int iio_device_register(struct iio_dev *indio_dev)
if (indio_dev->modes & INDIO_BUFFER_TRIGGERED)
iio_device_register_trigger_consumer(indio_dev);

if ((indio_dev->modes & INDIO_ALL_BUFFER_MODES) &&
indio_dev->setup_ops == NULL)
indio_dev->setup_ops = &noop_ring_setup_ops;

ret = device_add(&indio_dev->dev);
if (ret < 0)
goto error_unreg_eventset;
Expand Down

0 comments on commit 87b0bad

Please sign in to comment.