Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[deliverable/linux.git] / drivers / iio / industrialio-event.c
index b49059de5d02bbfb4c7f8f37a2f8b4407f4fb0b2..fa6543bf67312702d14793946b6b902334f35c9d 100644 (file)
@@ -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;
This page took 0.02677 seconds and 5 git commands to generate.