aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-09 13:35:32 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-09 13:35:32 -0700
commit8b67527113a3396b2d66402a4fe83b08e74acc63 (patch)
tree93e63aa54d3afb0a667c0bb897a07db37d357cc5 /drivers/iio
parent0ab1900539d46a3a8b7a006819ef5ec0e3288e5b (diff)
parent7b7627410e2c211f24787f61e6419e16d259aa13 (diff)
Merge tag 'fixes-togreg_8_7_2012' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Mixed bag of IIO fixes. Quite a few cases of interrupt handlers returning errors and a few more specific bits and bobs. Most of these only effect fairly obscure error paths. The IRQF_ONESHOT one may cause trouble given the requests will now be rejected. Jonathan 8_7_2012
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/industrialio-buffer.c2
-rw-r--r--drivers/iio/industrialio-event.c3
-rw-r--r--drivers/iio/inkern.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 3d8d187eef2..096a6bfe0cd 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -292,7 +292,7 @@ int iio_buffer_register(struct iio_dev *indio_dev,
if (channels[i].scan_index >
(int)indio_dev->masklength - 1)
indio_dev->masklength
- = indio_dev->channels[i].scan_index + 1;
+ = channels[i].scan_index + 1;
ret = iio_buffer_add_channel_sysfs(indio_dev,
&channels[i]);
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index b49059de5d0..fa6543bf673 100644
--- a/drivers/iio/industrialio-event.c
+++ b/drivers/iio/industrialio-event.c
@@ -345,7 +345,6 @@ static inline int __iio_add_event_config_attrs(struct iio_dev *indio_dev)
{
int j, ret, attrcount = 0;
- INIT_LIST_HEAD(&indio_dev->event_interface->dev_attr_list);
/* Dynically created from the channels array */
for (j = 0; j < indio_dev->num_channels; j++) {
ret = iio_device_add_event_sysfs(indio_dev,
@@ -396,6 +395,8 @@ int iio_device_register_eventset(struct iio_dev *indio_dev)
goto error_ret;
}
+ INIT_LIST_HEAD(&indio_dev->event_interface->dev_attr_list);
+
iio_setup_ev_int(indio_dev->event_interface);
if (indio_dev->info->event_attrs != NULL) {
attr = indio_dev->info->event_attrs->attrs;
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 9a46ca61ef0..e2aded04996 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -193,7 +193,6 @@ struct iio_channel *iio_channel_get_all(const char *name)
c->map->adc_channel_label);
if (chans[mapind].channel == NULL) {
ret = -EINVAL;
- iio_device_put(chans[mapind].indio_dev);
goto error_free_chans;
}
iio_device_get(chans[mapind].indio_dev);