]> git.baikalelectronics.ru Git - kernel.git/commit
iio: core: Move the currentmode entry to the opaque structure
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 7 Feb 2022 14:38:38 +0000 (15:38 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 10 Apr 2022 15:23:01 +0000 (16:23 +0100)
commitd5a552ee4e9cfe5b013e6b486f4ab83e7262f7ff
tree2c7bdbe7c725c6ef27de8b355b820c8ac27af316
parent5faf401a1234238be09548a15295a3cc36d2d66f
iio: core: Move the currentmode entry to the opaque structure

This entry should, under no situation, be modified by device
drivers. Now that we have limited its read access to device drivers
really needing it and did so through a dedicated helper, we can
easily move this variable to the opaque structure in order to
prevent any further modification from non-authorized code (out of the
core, basically).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20220207143840.707510-12-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-core.c
drivers/iio/industrialio-trigger.c
include/linux/iio/iio-opaque.h
include/linux/iio/iio.h