Skip to content

Commit 96144d4

Browse files
commodojic23
authored andcommitted
iio: buffer: remove attrcount_orig var from sysfs creation
The variable no longer does anything. It should have been removed with commit 2e03680 ("iio: buffer: remove 'scan_el_attrs' attribute group from buffer struct"). That was about the last time this was needed. Signed-off-by: Alexandru Ardelean <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 8712b30 commit 96144d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/iio/industrialio-buffer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
12421242
struct iio_dev_attr *p;
12431243
struct attribute **attr;
12441244
struct iio_buffer *buffer = indio_dev->buffer;
1245-
int ret, i, attrn, attrcount, attrcount_orig = 0;
1245+
int ret, i, attrn, attrcount;
12461246
const struct iio_chan_spec *channels;
12471247

12481248
channels = indio_dev->channels;
@@ -1286,7 +1286,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
12861286

12871287
indio_dev->groups[indio_dev->groupcounter++] = &buffer->buffer_group;
12881288

1289-
attrcount = attrcount_orig;
1289+
attrcount = 0;
12901290
INIT_LIST_HEAD(&buffer->scan_el_dev_attr_list);
12911291
channels = indio_dev->channels;
12921292
if (channels) {
@@ -1323,7 +1323,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
13231323
ret = -ENOMEM;
13241324
goto error_free_scan_mask;
13251325
}
1326-
attrn = attrcount_orig;
1326+
attrn = 0;
13271327

13281328
list_for_each_entry(p, &buffer->scan_el_dev_attr_list, l)
13291329
buffer->scan_el_group.attrs[attrn++] = &p->dev_attr.attr;

0 commit comments

Comments
 (0)