]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/iio/industrialio-event.c
iio: iio_device_add_event_sysfs() bugfix
[karo-tx-linux.git] / drivers / iio / industrialio-event.c
index 10aa9ef86cece1b80fa09c57d2a52e344e4dfc12..f146acd1273775b75efb993b77a5e5ed6446b533 100644 (file)
@@ -276,7 +276,7 @@ static int iio_device_add_event_sysfs(struct iio_dev *indio_dev,
                        goto error_ret;
                }
                if (chan->modified)
-                       mask = IIO_MOD_EVENT_CODE(chan->type, 0, chan->channel,
+                       mask = IIO_MOD_EVENT_CODE(chan->type, 0, chan->channel2,
                                                  i/IIO_EV_DIR_MAX,
                                                  i%IIO_EV_DIR_MAX);
                else if (chan->differential)