]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
regulator: tps65023: Constify static data
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 9 Sep 2024 13:51:19 +0000 (15:51 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 10 Sep 2024 11:44:09 +0000 (12:44 +0100)
Driver does not modify static data with regulator description (struct
tps_driver_data), 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-8-8934704a5787@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/tps65023-regulator.c

index d5757fd9a65bb1d0ecc1e398482b47288e520263..3334b5b7d907f1f1e14fa5d3568aa1f7518c3926 100644 (file)
@@ -242,17 +242,17 @@ static const struct regulator_desc tps65023_regulators[] = {
        TPS65023_REGULATOR_LDO(2, TPS65023_LDO2_VSEL_table, 0x70),
 };
 
-static struct tps_driver_data tps65020_drv_data = {
+static const struct tps_driver_data tps65020_drv_data = {
        .desc = tps65020_regulators,
        .core_regulator = TPS65023_DCDC_3,
 };
 
-static struct tps_driver_data tps65021_drv_data = {
+static const struct tps_driver_data tps65021_drv_data = {
        .desc = tps65021_regulators,
        .core_regulator = TPS65023_DCDC_3,
 };
 
-static struct tps_driver_data tps65023_drv_data = {
+static const struct tps_driver_data tps65023_drv_data = {
        .desc = tps65023_regulators,
        .core_regulator = TPS65023_DCDC_1,
 };