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

Configure Feed

Select the types of activity you want to include in your feed.

regulator: rk808: Constify rk817 regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20191008010628.8513-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
2e67f322 0b2ba815

+5 -5
+5 -5
drivers/regulator/rk808-regulator.c
··· 686 686 REGULATOR_LINEAR_RANGE(2300000, 63, 63, 0), 687 687 }; 688 688 689 - static struct regulator_ops rk809_buck5_ops_range = { 689 + static const struct regulator_ops rk809_buck5_ops_range = { 690 690 .list_voltage = regulator_list_voltage_linear_range, 691 691 .map_voltage = regulator_map_voltage_linear_range, 692 692 .get_voltage_sel = regulator_get_voltage_sel_regmap, ··· 700 700 .set_suspend_disable = rk817_set_suspend_disable, 701 701 }; 702 702 703 - static struct regulator_ops rk817_reg_ops = { 703 + static const struct regulator_ops rk817_reg_ops = { 704 704 .list_voltage = regulator_list_voltage_linear, 705 705 .map_voltage = regulator_map_voltage_linear, 706 706 .get_voltage_sel = regulator_get_voltage_sel_regmap, ··· 713 713 .set_suspend_disable = rk817_set_suspend_disable, 714 714 }; 715 715 716 - static struct regulator_ops rk817_boost_ops = { 716 + static const struct regulator_ops rk817_boost_ops = { 717 717 .list_voltage = regulator_list_voltage_linear, 718 718 .map_voltage = regulator_map_voltage_linear, 719 719 .get_voltage_sel = regulator_get_voltage_sel_regmap, ··· 725 725 .set_suspend_disable = rk817_set_suspend_disable, 726 726 }; 727 727 728 - static struct regulator_ops rk817_buck_ops_range = { 728 + static const struct regulator_ops rk817_buck_ops_range = { 729 729 .list_voltage = regulator_list_voltage_linear_range, 730 730 .map_voltage = regulator_map_voltage_linear_range, 731 731 .get_voltage_sel = regulator_get_voltage_sel_regmap, ··· 743 743 .set_suspend_disable = rk817_set_suspend_disable, 744 744 }; 745 745 746 - static struct regulator_ops rk817_switch_ops = { 746 + static const struct regulator_ops rk817_switch_ops = { 747 747 .enable = regulator_enable_regmap, 748 748 .disable = regulator_disable_regmap, 749 749 .is_enabled = rk8xx_is_enabled_wmsk_regmap,