]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit03ef7a098a998fdabf4b432f33510dee9daedd69
tree9da77768d1afdf7d0fcf94432530cc838a83068a
parent81cf190d3e5530f66496ba620b1ca4a2cdb36a12
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