Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: qcom-refgen: Constify static data

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-14-8934704a5787@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
7eb5d065 6f4fd2b8

+2 -2
+2 -2
drivers/regulator/qcom-refgen-regulator.c
··· 62 62 return 1; 63 63 } 64 64 65 - static struct regulator_desc sdm845_refgen_desc = { 65 + static const struct regulator_desc sdm845_refgen_desc = { 66 66 .enable_time = 5, 67 67 .name = "refgen", 68 68 .owner = THIS_MODULE, ··· 74 74 }, 75 75 }; 76 76 77 - static struct regulator_desc sm8250_refgen_desc = { 77 + static const struct regulator_desc sm8250_refgen_desc = { 78 78 .enable_reg = REFGEN_REG_PWRDWN_CTRL5, 79 79 .enable_mask = REFGEN_PWRDWN_CTRL5_MASK, 80 80 .enable_val = REFGEN_PWRDWN_CTRL5_ENABLE,