]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: max11410: make vref register name arrays static const
authorGiorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Mon, 23 Mar 2026 06:46:41 +0000 (10:46 +0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 25 Mar 2026 20:27:13 +0000 (20:27 +0000)
commit6b4cd7b76ee7ed4fb6c74d3876a73979b3669536
treef7fdc7c2586bf1e38254ad71b0daab81e2c35ded
parent7198b881fb00526f6e1125bba0a24e7dc8d95a90
iio: adc: max11410: make vref register name arrays static const

The vrefp_regs and vrefn_regs arrays are constant lookup tables and
are not modified.

Make them static const so they are not reinitialized on each probe
call and are placed in read-only memory. Mark the pointer array as
const as well to prevent unintended modification.

Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max11410.c