]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
regulator: max77826: Constify static data
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 9 Sep 2024 13:51:21 +0000 (15:51 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 10 Sep 2024 11:44:11 +0000 (12:44 +0100)
Driver does not modify static data with regulator description (struct
regulator_desc), so make it const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240909-regulator-const-v1-10-8934704a5787@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max77826-regulator.c

index 4b656a6941088206609e6fca1f02871e3f54b386..310bc8ee7af8424080c16829d7532622df788bb4 100644 (file)
@@ -186,7 +186,7 @@ static const struct regulator_ops max77826_buck_ops = {
        .set_voltage_time_sel   = max77826_set_voltage_time_sel,
 };
 
-static struct regulator_desc max77826_regulators_desc[] = {
+static const struct regulator_desc max77826_regulators_desc[] = {
        MAX77826_LDO(1, NMOS),
        MAX77826_LDO(2, NMOS),
        MAX77826_LDO(3, NMOS),