Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275875
b: refs/heads/master
c: b464133
h: refs/heads/master
i:
  275873: e96e565
  275871: 99ee5c1
v: v3
  • Loading branch information
Al Viro committed Nov 21, 2011
1 parent 5d20b94 commit ec989b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: c332c10c01d8d31f2eba9abc04b0fc3d62610ed8
refs/heads/master: b46413367961c2e8bd827e067a231be982aaeee2
10 changes: 9 additions & 1 deletion trunk/drivers/staging/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ static const struct file_operations iio_event_chrdev_fileops = {

static int iio_event_getfd(struct iio_dev *indio_dev)
{
int fd;

if (indio_dev->event_interface == NULL)
return -ENODEV;

Expand All @@ -252,9 +254,15 @@ static int iio_event_getfd(struct iio_dev *indio_dev)
return -EBUSY;
}
mutex_unlock(&indio_dev->event_interface->event_list_lock);
return anon_inode_getfd("iio:event",
fd = anon_inode_getfd("iio:event",
&iio_event_chrdev_fileops,
indio_dev->event_interface, O_RDONLY);
if (fd < 0) {
mutex_lock(&indio_dev->event_interface->event_list_lock);
clear_bit(IIO_BUSY_BIT_POS, &ev_int->flags);
mutex_unlock(&indio_dev->event_interface->event_list_lock);
}
return fd;
}

static int __init iio_init(void)
Expand Down

0 comments on commit ec989b4

Please sign in to comment.