regulator: sc2731: Constify regulators
authorAxel Lin <axel.lin@ingics.com>
Mon, 25 Mar 2019 23:57:39 +0000 (07:57 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 26 Mar 2019 13:25:35 +0000 (13:25 +0000)
The regulators array should never need to be modified, make it const so
compiler can put it to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/sc2731-regulator.c

index eb2bdf060b7b2318abff2c7badad61b2c124f764..0f21f95c8981c3e4aac7db7428eb0c1205d9ea0b 100644 (file)
@@ -146,7 +146,7 @@ static const struct regulator_ops sc2731_regu_linear_ops = {
        .vsel_mask              = vmask,                        \
 }
 
-static struct regulator_desc regulators[] = {
+static const struct regulator_desc regulators[] = {
        SC2731_REGU_LINEAR(BUCK_CPU0, SC2731_POWER_PD_SW,
                           SC2731_DCDC_CPU0_PD_MASK, SC2731_DCDC_CPU0_VOL,
                           SC2731_DCDC_CPU0_VOL_MASK, 3125, 400000, 1996875),