Skip to content

Commit

Permalink
iio: iio_device_add_event_sysfs() bugfix
Browse files Browse the repository at this point in the history
Fix mask generation for modified channels.

Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Lukasz Czerwinski authored and Jonathan Cameron committed Sep 18, 2013
1 parent 40e23ce commit 2b0774d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/industrialio-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2b0774d

Please sign in to comment.