mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
regulator: hi6421: Constify static data
Driver does not modify static data with regulator description (struct hi6421_regulator_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-6-8934704a5787@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b3f1e8e32e
commit
b94afa51ca
@ -303,7 +303,7 @@ static const struct regulator_ops hi6421_buck345_ops;
|
||||
}
|
||||
|
||||
/* HI6421 regulator information */
|
||||
static struct hi6421_regulator_info
|
||||
static const struct hi6421_regulator_info
|
||||
hi6421_regulator_info[HI6421_NUM_REGULATORS] = {
|
||||
HI6421_LDO(LDO0, hi6421_vout0, ldo_0_voltages, 0x20, 0x07, 0x20, 0x10,
|
||||
10000, 0x20, 8000),
|
||||
@ -384,7 +384,7 @@ static int hi6421_regulator_enable(struct regulator_dev *rdev)
|
||||
|
||||
static unsigned int hi6421_regulator_ldo_get_mode(struct regulator_dev *rdev)
|
||||
{
|
||||
struct hi6421_regulator_info *info;
|
||||
const struct hi6421_regulator_info *info;
|
||||
unsigned int reg_val;
|
||||
|
||||
info = container_of(rdev->desc, struct hi6421_regulator_info, desc);
|
||||
@ -397,7 +397,7 @@ static unsigned int hi6421_regulator_ldo_get_mode(struct regulator_dev *rdev)
|
||||
|
||||
static unsigned int hi6421_regulator_buck_get_mode(struct regulator_dev *rdev)
|
||||
{
|
||||
struct hi6421_regulator_info *info;
|
||||
const struct hi6421_regulator_info *info;
|
||||
unsigned int reg_val;
|
||||
|
||||
info = container_of(rdev->desc, struct hi6421_regulator_info, desc);
|
||||
@ -411,7 +411,7 @@ static unsigned int hi6421_regulator_buck_get_mode(struct regulator_dev *rdev)
|
||||
static int hi6421_regulator_ldo_set_mode(struct regulator_dev *rdev,
|
||||
unsigned int mode)
|
||||
{
|
||||
struct hi6421_regulator_info *info;
|
||||
const struct hi6421_regulator_info *info;
|
||||
unsigned int new_mode;
|
||||
|
||||
info = container_of(rdev->desc, struct hi6421_regulator_info, desc);
|
||||
@ -436,7 +436,7 @@ static int hi6421_regulator_ldo_set_mode(struct regulator_dev *rdev,
|
||||
static int hi6421_regulator_buck_set_mode(struct regulator_dev *rdev,
|
||||
unsigned int mode)
|
||||
{
|
||||
struct hi6421_regulator_info *info;
|
||||
const struct hi6421_regulator_info *info;
|
||||
unsigned int new_mode;
|
||||
|
||||
info = container_of(rdev->desc, struct hi6421_regulator_info, desc);
|
||||
@ -462,7 +462,7 @@ static unsigned int
|
||||
hi6421_regulator_ldo_get_optimum_mode(struct regulator_dev *rdev,
|
||||
int input_uV, int output_uV, int load_uA)
|
||||
{
|
||||
struct hi6421_regulator_info *info;
|
||||
const struct hi6421_regulator_info *info;
|
||||
|
||||
info = container_of(rdev->desc, struct hi6421_regulator_info, desc);
|
||||
|
||||
@ -539,7 +539,7 @@ static int hi6421_regulator_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct hi6421_pmic *pmic = dev_get_drvdata(pdev->dev.parent);
|
||||
struct hi6421_regulator_pdata *pdata;
|
||||
struct hi6421_regulator_info *info;
|
||||
const struct hi6421_regulator_info *info;
|
||||
struct regulator_config config = { };
|
||||
struct regulator_dev *rdev;
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user