iio: addac: ad74xxx: Constify struct iio_chan_spec​
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 7 Sep 2024 13:51:07 +0000 (15:51 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 30 Sep 2024 08:20:59 +0000 (09:20 +0100)
commit4f3333a658a05f7f9dd88d3ba194d665a4f4b19a
treea96b18944d40562677ee4dad2bb1dbc1ac1be571
parent3ad9e6396834b66e2b77222e6bea9e5fb08699d6
iio: addac: ad74xxx: Constify struct iio_chan_spec​

'struct iio_chan_spec' are not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  35749    5879     384   42012    a41c drivers/iio/addac/ad74115.o
  32242    3297     384   35923    8c53 drivers/iio/addac/ad74413r.o

After:
=====
   text    data     bss     dec     hex filename
  39109    2519     384   42012    a41c drivers/iio/addac/ad74115.o
  33842    1697     384   35923    8c53 drivers/iio/addac/ad74413r.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/da291278e78b983ea2e657a25769f7d82ea2a6d0.1725717045.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/addac/ad74115.c
drivers/iio/addac/ad74413r.c