]> git.baikalelectronics.ru Git - kernel.git/commit
iio: buffer: split buffer sysfs creation to take buffer as primary arg
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Thu, 17 Sep 2020 12:59:51 +0000 (15:59 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 17 Sep 2020 17:56:10 +0000 (18:56 +0100)
commitbb1a1dc42ac7c6b502a82f0d27bf1f6f8e5ea9bc
tree3d679cf2ef12e196432734bf2be5cfaef92b31ba
parent9f94ca582f68b1769fbf15f65232e27d4d610599
iio: buffer: split buffer sysfs creation to take buffer as primary arg

Currently the iio_buffer_{alloc,free}_sysfs_and_mask() take 'indio_dev' as
primary argument. This change splits the main logic into a private function
that takes an IIO buffer as primary argument.

That way, the functions can be extended to configure the sysfs for multiple
buffers.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200917125951.861-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c