Commit 96144d43 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron

iio: buffer: remove attrcount_orig var from sysfs creation

The variable no longer does anything.
It should have been removed with commit 2e036804 ("iio: buffer: remove
'scan_el_attrs' attribute group from buffer struct").
That was about the last time this was needed.
Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 8712b309
...@@ -1242,7 +1242,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev) ...@@ -1242,7 +1242,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
struct iio_dev_attr *p; struct iio_dev_attr *p;
struct attribute **attr; struct attribute **attr;
struct iio_buffer *buffer = indio_dev->buffer; struct iio_buffer *buffer = indio_dev->buffer;
int ret, i, attrn, attrcount, attrcount_orig = 0; int ret, i, attrn, attrcount;
const struct iio_chan_spec *channels; const struct iio_chan_spec *channels;
channels = indio_dev->channels; channels = indio_dev->channels;
...@@ -1286,7 +1286,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev) ...@@ -1286,7 +1286,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
indio_dev->groups[indio_dev->groupcounter++] = &buffer->buffer_group; indio_dev->groups[indio_dev->groupcounter++] = &buffer->buffer_group;
attrcount = attrcount_orig; attrcount = 0;
INIT_LIST_HEAD(&buffer->scan_el_dev_attr_list); INIT_LIST_HEAD(&buffer->scan_el_dev_attr_list);
channels = indio_dev->channels; channels = indio_dev->channels;
if (channels) { if (channels) {
...@@ -1323,7 +1323,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev) ...@@ -1323,7 +1323,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
ret = -ENOMEM; ret = -ENOMEM;
goto error_free_scan_mask; goto error_free_scan_mask;
} }
attrn = attrcount_orig; attrn = 0;
list_for_each_entry(p, &buffer->scan_el_dev_attr_list, l) list_for_each_entry(p, &buffer->scan_el_dev_attr_list, l)
buffer->scan_el_group.attrs[attrn++] = &p->dev_attr.attr; buffer->scan_el_group.attrs[attrn++] = &p->dev_attr.attr;
......
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