power: supply: wm831x: Constify struct chg_map and some arrays
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 4 Apr 2025 17:27:38 +0000 (19:27 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 28 Apr 2025 00:07:06 +0000 (02:07 +0200)
commit883730c192b5cf9d72cabefd83bfb3dcd1aadb6f
treeeea21304048cc1195ad386640ec527021e83d74c
parentafe5301bfbaa0692811da3ba5f8769f599f7ff3f
power: supply: wm831x: Constify struct chg_map and some arrays

'struct chg_map' is not modified in this driver.

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

While at it, also constify a few other arrays.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  14263    1744       0   16007    3e87 drivers/power/supply/wm831x_power.o

After:
=====
   text    data     bss     dec     hex filename
  14695    1288       0   15983    3e6f drivers/power/supply/wm831x_power.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/0edde57b691db7f920d121fdbd5ebc3fb24f30f1.1743787625.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/wm831x_power.c