]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
regulator: bd9576: Constify the voltage tables
authorAxel Lin <axel.lin@ingics.com>
Tue, 25 May 2021 10:04:05 +0000 (18:04 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 3 Jun 2021 13:04:54 +0000 (14:04 +0100)
Also use unsigned int instead of int for the voltage tables.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210525100405.2506483-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/bd9576-regulator.c

index 204a2da054f534da1e2257b4ce083c0f992197ea..8e63169eebae303e19773b64bdbf5c9c5c23459c 100644 (file)
 #define BD957X_VOUTS4_BASE_VOLT        1030000
 #define BD957X_VOUTS34_NUM_VOLT        32
 
-static int vout1_volt_table[] = {5000000, 4900000, 4800000, 4700000, 4600000,
-                                4500000, 4500000, 4500000, 5000000, 5100000,
-                                5200000, 5300000, 5400000, 5500000, 5500000,
-                                5500000};
-
-static int vout2_volt_table[] = {1800000, 1780000, 1760000, 1740000, 1720000,
-                                1700000, 1680000, 1660000, 1800000, 1820000,
-                                1840000, 1860000, 1880000, 1900000, 1920000,
-                                1940000};
-
-static int voutl1_volt_table[] = {2500000, 2540000, 2580000, 2620000, 2660000,
-                                 2700000, 2740000, 2780000, 2500000, 2460000,
-                                 2420000, 2380000, 2340000, 2300000, 2260000,
-                                 2220000};
+static const unsigned int vout1_volt_table[] = {
+       5000000, 4900000, 4800000, 4700000, 4600000,
+       4500000, 4500000, 4500000, 5000000, 5100000,
+       5200000, 5300000, 5400000, 5500000, 5500000,
+       5500000
+};
+
+static const unsigned int vout2_volt_table[] = {
+       1800000, 1780000, 1760000, 1740000, 1720000,
+       1700000, 1680000, 1660000, 1800000, 1820000,
+       1840000, 1860000, 1880000, 1900000, 1920000,
+       1940000
+};
+
+static const unsigned int voutl1_volt_table[] = {
+       2500000, 2540000, 2580000, 2620000, 2660000,
+       2700000, 2740000, 2780000, 2500000, 2460000,
+       2420000, 2380000, 2340000, 2300000, 2260000,
+       2220000
+};
 
 struct bd957x_regulator_data {
        struct regulator_desc desc;