]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: buffer: hw-consumer: remove redundant scan_mask flexible array
authorNuno Sá <nuno.sa@analog.com>
Tue, 3 Mar 2026 11:50:44 +0000 (11:50 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 14 Mar 2026 12:10:21 +0000 (12:10 +0000)
commit9a2e1233d38c460ad07f36901931f3674a32d1ed
tree28fa3b5c10dd5eeb9917ccecedfa9566f1c1641b
parentd6f2eac6440329d8c1d981b907b9ecd325ee3d2f
iio: buffer: hw-consumer: remove redundant scan_mask flexible array

The scan_mask flexible array member in hw_consumer_buffer duplicates
the scan_mask pointer already present in struct iio_buffer. Remove it
and allocate the bitmap directly with bitmap_zalloc(), assigning it to
buf->buffer.scan_mask. This simplifies the code and there's no need for
the flex array allocation.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/buffer/industrialio-hw-consumer.c