iio: light: ltr501: Constify structs
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Sat, 2 May 2020 09:52:37 +0000 (11:52 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 11 May 2020 19:19:19 +0000 (20:19 +0100)
commit6b46ddb51eab245c64b6b9c55c189e45967d213f
tree9da77768d1afdf7d0fcf94432530cc838a83068a
parentda7de29bb1716c96cab1566d845e434848604be4
iio: light: ltr501: Constify structs

Constify some data structs that are never changed. In order to do so,
also update a couple of functions that now need to accept pointers to
const struct instead of struct. While at it, update a few more functions
to accept pointers to const struct instead of pointers.

This allows the compiler to put more data in the code segment instead of
the data segment, as seen by the output of the file command:

Before:
   text    data     bss     dec     hex filename
  27080    8144     192   35416    8a58 drivers/iio/light/ltr501.o

After:
   text    data     bss     dec     hex filename
  27688    7536     192   35416    8a58 drivers/iio/light/ltr501.o
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/ltr501.c