aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iio/industrialio-event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index b49059de5d02..fa6543bf6731 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)
345{ 345{
346 int j, ret, attrcount = 0; 346 int j, ret, attrcount = 0;
347 347
348 INIT_LIST_HEAD(&indio_dev->event_interface->dev_attr_list);
349 /* Dynically created from the channels array */ 348 /* Dynically created from the channels array */
350 for (j = 0; j < indio_dev->num_channels; j++) { 349 for (j = 0; j < indio_dev->num_channels; j++) {
351 ret = iio_device_add_event_sysfs(indio_dev, 350 ret = iio_device_add_event_sysfs(indio_dev,
@@ -396,6 +395,8 @@ int iio_device_register_eventset(struct iio_dev *indio_dev)
396 goto error_ret; 395 goto error_ret;
397 } 396 }
398 397
398 INIT_LIST_HEAD(&indio_dev->event_interface->dev_attr_list);
399
399 iio_setup_ev_int(indio_dev->event_interface); 400 iio_setup_ev_int(indio_dev->event_interface);
400 if (indio_dev->info->event_attrs != NULL) { 401 if (indio_dev->info->event_attrs != NULL) {
401 attr = indio_dev->info->event_attrs->attrs; 402 attr = indio_dev->info->event_attrs->attrs;