Commit 2b0774df authored by Lukasz Czerwinski's avatar Lukasz Czerwinski Committed by Jonathan Cameron

iio: iio_device_add_event_sysfs() bugfix

Fix mask generation for modified channels.
Signed-off-by: default avatarLukasz Czerwinski <l.czerwinski@samsung.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 40e23ced
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment