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)
commitff3f7e049aef9202deeb2c67cfe7da819846dba1
tree790605f79ae3e6eb415d1c9b23e360c5b3c3fd27
parent256d4b83c0760de01d6192c372b068e7ecb376db
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