]> git.baikalelectronics.ru Git - kernel.git/commit
iio: buffer: extend short-hand use for 'indio_dev->buffer'
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 24 Apr 2020 15:22:43 +0000 (18:22 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 3 May 2020 08:47:21 +0000 (09:47 +0100)
commit0611a6962eb0d19f913ad7884eabd8c0ac15d530
tree790605f79ae3e6eb415d1c9b23e360c5b3c3fd27
parentcfdab1002d9058e16f04ef9e4d0294cab5182498
iio: buffer: extend short-hand use for 'indio_dev->buffer'

This change is both cosmetic and a prequel to adding support for attaching
multiple buffers per IIO device.

The IIO buffer sysfs attrs are mostly designed to support only one attached
buffer, and in order to support more, we need to centralize [in each attr
function] the buffer which is being accessed.

This also makes it a bit more uniform, as in some functions there is a
short-hand 'buffer' variable and at the same time the 'indio_dev->buffer'
is still access directly.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c