* [PATCH 1/1] iio: iio_event_getfd -- fix ev_int build failure
@ 2011-11-25 10:56 Andy Whitcroft
2011-11-25 12:35 ` Lars-Peter Clausen
0 siblings, 1 reply; 2+ messages in thread
From: Andy Whitcroft @ 2011-11-25 10:56 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio
Cc: Greg Kroah-Hartman, devel, linux-kernel, Andy Whitcroft
Fix build failure in staging iio driver:
.../drivers/staging/iio/industrialio-core.c: In function 'iio_event_getfd':
.../drivers/staging/iio/industrialio-core.c:262:32: error:
'ev_int' undeclared (first use in this function)
Also convert the rest of the function to use the new variable.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/staging/iio/industrialio-core.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 2656409..aec9311 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -242,25 +242,24 @@ static const struct file_operations iio_event_chrdev_fileops = {
static int iio_event_getfd(struct iio_dev *indio_dev)
{
+ struct iio_event_interface *ev_int = indio_dev->event_interface;
int fd;
- if (indio_dev->event_interface == NULL)
+ if (ev_int == NULL)
return -ENODEV;
- mutex_lock(&indio_dev->event_interface->event_list_lock);
- if (test_and_set_bit(IIO_BUSY_BIT_POS,
- &indio_dev->event_interface->flags)) {
- mutex_unlock(&indio_dev->event_interface->event_list_lock);
+ mutex_lock(&ev_int->event_list_lock);
+ if (test_and_set_bit(IIO_BUSY_BIT_POS, &ev_int->flags)) {
+ mutex_unlock(&ev_int->event_list_lock);
return -EBUSY;
}
- mutex_unlock(&indio_dev->event_interface->event_list_lock);
+ mutex_unlock(&ev_int->event_list_lock);
fd = anon_inode_getfd("iio:event",
- &iio_event_chrdev_fileops,
- indio_dev->event_interface, O_RDONLY);
+ &iio_event_chrdev_fileops, ev_int, O_RDONLY);
if (fd < 0) {
- mutex_lock(&indio_dev->event_interface->event_list_lock);
+ mutex_lock(&ev_int->event_list_lock);
clear_bit(IIO_BUSY_BIT_POS, &ev_int->flags);
- mutex_unlock(&indio_dev->event_interface->event_list_lock);
+ mutex_unlock(&ev_int->event_list_lock);
}
return fd;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] iio: iio_event_getfd -- fix ev_int build failure
2011-11-25 10:56 [PATCH 1/1] iio: iio_event_getfd -- fix ev_int build failure Andy Whitcroft
@ 2011-11-25 12:35 ` Lars-Peter Clausen
0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2011-11-25 12:35 UTC (permalink / raw)
To: Andy Whitcroft
Cc: Jonathan Cameron, linux-iio, Greg Kroah-Hartman, devel,
linux-kernel
On 11/25/2011 11:56 AM, Andy Whitcroft wrote:
> Fix build failure in staging iio driver:
>
> .../drivers/staging/iio/industrialio-core.c: In function 'iio_event_getfd':
> .../drivers/staging/iio/industrialio-core.c:262:32: error:
> 'ev_int' undeclared (first use in this function)
>
> Also convert the rest of the function to use the new variable.
>
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Hi Andy,
I think your patch is number 6 for this bug. A fix should already be on it's
way.
Thanks,
- Lars
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-25 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 10:56 [PATCH 1/1] iio: iio_event_getfd -- fix ev_int build failure Andy Whitcroft
2011-11-25 12:35 ` Lars-Peter Clausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox