From: Lukasz Czerwinski Date: Wed, 18 Sep 2013 09:21:00 +0000 (+0100) Subject: iio: iio_device_add_event_sysfs() bugfix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b0774df40d7ceed9bda3423d436d9fea30fb281;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git iio: iio_device_add_event_sysfs() bugfix Fix mask generation for modified channels. Signed-off-by: Lukasz Czerwinski Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index 10aa9ef86cec..f146acd12737 100644 --- a/drivers/iio/industrialio-event.c +++ b/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)