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>
This commit is contained in:
Krzysztof Kozlowski 2024-09-09 15:51:25 +02:00 committed by Mark Brown
parent 6f4fd2b8a5
commit 7eb5d065ec
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -62,7 +62,7 @@ static int qcom_sdm845_refgen_is_enabled(struct regulator_dev *rdev)
return 1;
}
static struct regulator_desc sdm845_refgen_desc = {
static const struct regulator_desc sdm845_refgen_desc = {
.enable_time = 5,
.name = "refgen",
.owner = THIS_MODULE,
@ -74,7 +74,7 @@ static struct regulator_desc sdm845_refgen_desc = {
},
};
static struct regulator_desc sm8250_refgen_desc = {
static const struct regulator_desc sm8250_refgen_desc = {
.enable_reg = REFGEN_REG_PWRDWN_CTRL5,
.enable_mask = REFGEN_PWRDWN_CTRL5_MASK,
.enable_val = REFGEN_PWRDWN_CTRL5_ENABLE,