OSDN Git Service

iio: iio_device_add_event_sysfs() bugfix
authorLukasz Czerwinski <l.czerwinski@samsung.com>
Wed, 18 Sep 2013 09:21:00 +0000 (10:21 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 18 Sep 2013 18:50:10 +0000 (19:50 +0100)
Fix mask generation for modified channels.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-event.c

index 10aa9ef..f146acd 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)