mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
iio: buffer: fix custom buffer attributes copy
Signed-off-by: Octavian Purdila <[email protected]> Reviewed-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
8f5d8727a7
commit
66ad1fd025
1 changed files with 1 additions and 1 deletions
|
|
@ -789,7 +789,7 @@ int iio_buffer_alloc_sysfs_and_mask(struct iio_dev *indio_dev)
|
|||
buffer->buffer_group.attrs[1] = &dev_attr_enable.attr;
|
||||
if (buffer->attrs)
|
||||
memcpy(&buffer->buffer_group.attrs[2], buffer->attrs,
|
||||
sizeof(*&buffer->buffer_group.attrs) * (attrcount - 2));
|
||||
sizeof(*&buffer->buffer_group.attrs) * attrcount);
|
||||
buffer->buffer_group.attrs[attrcount+2] = NULL;
|
||||
|
||||
indio_dev->groups[indio_dev->groupcounter++] = &buffer->buffer_group;
|
||||
|
|
|
|||
Loading…
Reference in a new issue