diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-09-02 17:14:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 16:02:02 -0700 |
commit | c04ea8ae99d71182b525cb8e4d48dc2fde0dd0ee (patch) | |
tree | e0354b27edf24e594faa1766327f78f07ddb7d1b /drivers/staging/iio/industrialio-core.c | |
parent | e614a54b296185b266b4bd91193e08a5fbd32422 (diff) | |
download | linux-c04ea8ae99d71182b525cb8e4d48dc2fde0dd0ee.tar.bz2 |
staging:iio:naming in the EV_BIT macro fix.
Should always have been IIO_EV_DIR_MAX as that's what it actually controls.
Also reduced the number to 4 as not yet seen a case needing more and this
is not userspace visible anyway.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/industrialio-core.c')
-rw-r--r-- | drivers/staging/iio/industrialio-core.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index c4985cb0947d..8c054c0a715b 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -791,27 +791,27 @@ static int iio_device_add_event_sysfs(struct iio_dev *dev_info, for_each_set_bit(i, &chan->event_mask, sizeof(chan->event_mask)*8) { postfix = kasprintf(GFP_KERNEL, "%s_%s_en", - iio_ev_type_text[i/IIO_EV_TYPE_MAX], - iio_ev_dir_text[i%IIO_EV_TYPE_MAX]); + iio_ev_type_text[i/IIO_EV_DIR_MAX], + iio_ev_dir_text[i%IIO_EV_DIR_MAX]); if (postfix == NULL) { ret = -ENOMEM; goto error_ret; } if (chan->modified) mask = IIO_MOD_EVENT_CODE(chan->type, 0, chan->channel, - i/IIO_EV_TYPE_MAX, - i%IIO_EV_TYPE_MAX); + i/IIO_EV_DIR_MAX, + i%IIO_EV_DIR_MAX); else if (chan->type == IIO_VOLTAGE_DIFF) mask = IIO_MOD_EVENT_CODE(chan->type, chan->channel, chan->channel2, - i/IIO_EV_TYPE_MAX, - i%IIO_EV_TYPE_MAX); + i/IIO_EV_DIR_MAX, + i%IIO_EV_DIR_MAX); else mask = IIO_UNMOD_EVENT_CODE(chan->type, chan->channel, - i/IIO_EV_TYPE_MAX, - i%IIO_EV_TYPE_MAX); + i/IIO_EV_DIR_MAX, + i%IIO_EV_DIR_MAX); ret = __iio_add_chan_devattr(postfix, chan, @@ -827,8 +827,8 @@ static int iio_device_add_event_sysfs(struct iio_dev *dev_info, goto error_ret; attrcount++; postfix = kasprintf(GFP_KERNEL, "%s_%s_value", - iio_ev_type_text[i/IIO_EV_TYPE_MAX], - iio_ev_dir_text[i%IIO_EV_TYPE_MAX]); + iio_ev_type_text[i/IIO_EV_DIR_MAX], + iio_ev_dir_text[i%IIO_EV_DIR_MAX]); if (postfix == NULL) { ret = -ENOMEM; goto error_ret; |