]> git.baikalelectronics.ru Git - kernel.git/commit
iio: Mark iio_device_type as const
authorLars-Peter Clausen <lars@metafoo.de>
Sun, 31 Oct 2021 08:04:21 +0000 (09:04 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 17 Nov 2021 17:51:35 +0000 (17:51 +0000)
commita29b99dc050ec2f2cc24586ea24512a0526b57e0
tree095e7043f8925e041b7b205180be92446956d047
parentc6907a30db8da5550b0c9c7de24fb11276326c79
iio: Mark iio_device_type as const

The iio_device_type struct is never modified, mark it as const. This allows
it to be placed in a read-only memory section, which will protect against
accidental or deliberate modification.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20211031080421.2086-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/iio_core.h
drivers/iio/industrialio-core.c