mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
regulator: hi6421v600: Constify static data
Driver does not modify static data with regulator description (struct hi6421_spmi_reg_info), 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-7-8934704a5787@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b94afa51ca
commit
5ec424afc9
@ -118,7 +118,7 @@ static int hi6421_spmi_regulator_enable(struct regulator_dev *rdev)
|
||||
|
||||
static unsigned int hi6421_spmi_regulator_get_mode(struct regulator_dev *rdev)
|
||||
{
|
||||
struct hi6421_spmi_reg_info *sreg;
|
||||
const struct hi6421_spmi_reg_info *sreg;
|
||||
unsigned int reg_val;
|
||||
|
||||
sreg = container_of(rdev->desc, struct hi6421_spmi_reg_info, desc);
|
||||
@ -133,7 +133,7 @@ static unsigned int hi6421_spmi_regulator_get_mode(struct regulator_dev *rdev)
|
||||
static int hi6421_spmi_regulator_set_mode(struct regulator_dev *rdev,
|
||||
unsigned int mode)
|
||||
{
|
||||
struct hi6421_spmi_reg_info *sreg;
|
||||
const struct hi6421_spmi_reg_info *sreg;
|
||||
unsigned int val;
|
||||
|
||||
sreg = container_of(rdev->desc, struct hi6421_spmi_reg_info, desc);
|
||||
@ -160,7 +160,7 @@ hi6421_spmi_regulator_get_optimum_mode(struct regulator_dev *rdev,
|
||||
int input_uV, int output_uV,
|
||||
int load_uA)
|
||||
{
|
||||
struct hi6421_spmi_reg_info *sreg;
|
||||
const struct hi6421_spmi_reg_info *sreg;
|
||||
|
||||
sreg = container_of(rdev->desc, struct hi6421_spmi_reg_info, desc);
|
||||
|
||||
@ -195,7 +195,7 @@ enum hi6421_spmi_regulator_id {
|
||||
hi6421v600_ldo34,
|
||||
};
|
||||
|
||||
static struct hi6421_spmi_reg_info regulator_info[] = {
|
||||
static const struct hi6421_spmi_reg_info regulator_info[] = {
|
||||
HI6421V600_LDO(ldo3, range_1v5_to_2v0,
|
||||
0x16, 0x01, 0x51,
|
||||
20000, 120,
|
||||
@ -235,7 +235,7 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev)
|
||||
struct device *pmic_dev = pdev->dev.parent;
|
||||
struct regulator_config config = { };
|
||||
struct hi6421_spmi_reg_priv *priv;
|
||||
struct hi6421_spmi_reg_info *info;
|
||||
const struct hi6421_spmi_reg_info *info;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct regmap *regmap;
|
||||
struct regulator_dev *rdev;
|
||||
|
Loading…
Reference in New Issue
Block a user