Browse Source

iio: iio_device_add_event_sysfs() bugfix

Fix mask generation for modified channels.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lukasz Czerwinski 11 years ago
parent
commit
2b0774df40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/iio/industrialio-event.c

+ 1 - 1
drivers/iio/industrialio-event.c

@@ -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)