]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
regulator: hi6421: Use correct variable type for regmap api val argument
authorAxel Lin <axel.lin@ingics.com>
Sat, 19 Jun 2021 12:41:33 +0000 (20:41 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 20 Sep 2021 16:49:28 +0000 (18:49 +0200)
BugLink: https://bugs.launchpad.net/bugs/1939899
[ Upstream commit ae60e6a9d24e89a74e2512204ad04de94921bdd2 ]

Use unsigned int instead of u32 for regmap_read/regmap_update_bits val
argument.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210619124133.4096683-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/regulator/hi6421-regulator.c

index 5ac3d7c29725a3a625293be7a584ac6c325b3c8c..f14cbabfa9851d8e896cd3daea3420b1197a0063 100644 (file)
@@ -386,7 +386,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 = rdev_get_drvdata(rdev);
-       u32 reg_val;
+       unsigned int reg_val;
 
        regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
        if (reg_val & info->mode_mask)
@@ -398,7 +398,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 = rdev_get_drvdata(rdev);
-       u32 reg_val;
+       unsigned int reg_val;
 
        regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
        if (reg_val & info->mode_mask)
@@ -411,7 +411,7 @@ static int hi6421_regulator_ldo_set_mode(struct regulator_dev *rdev,
                                                unsigned int mode)
 {
        struct hi6421_regulator_info *info = rdev_get_drvdata(rdev);
-       u32 new_mode;
+       unsigned int new_mode;
 
        switch (mode) {
        case REGULATOR_MODE_NORMAL:
@@ -435,7 +435,7 @@ static int hi6421_regulator_buck_set_mode(struct regulator_dev *rdev,
                                                unsigned int mode)
 {
        struct hi6421_regulator_info *info = rdev_get_drvdata(rdev);
-       u32 new_mode;
+       unsigned int new_mode;
 
        switch (mode) {
        case REGULATOR_MODE_NORMAL: