diff options
author | Axel Lin <axel.lin@ingics.com> | 2018-01-01 07:38:50 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-03 07:10:14 -0500 |
commit | fa32f7a3fedd800161ca529397da14faa6c47c67 (patch) | |
tree | 748af901dfa1a62bc4d0814dc3c4f257411aae1d | |
parent | 433c9bb77b8131ef340148565996b3818fbf2f23 (diff) |
regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE
The defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE makes
regmap_write() call looks strange because it takes reg parameter fist
then val.
Base on Erick's suggestion to define SC2731_PWR_WR_PROT and
SC2731_WR_UNLOCK_VALUE instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Erick Chen <erick.chen@spreadtrum.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/sc2731-regulator.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/sc2731-regulator.c index 794fcd504b3d..eb2bdf060b7b 100644 --- a/drivers/regulator/sc2731-regulator.c +++ b/drivers/regulator/sc2731-regulator.c | |||
@@ -13,8 +13,8 @@ | |||
13 | /* | 13 | /* |
14 | * SC2731 regulator lock register | 14 | * SC2731 regulator lock register |
15 | */ | 15 | */ |
16 | #define SC2731_PWR_WR_PROT_VALUE 0xf0c | 16 | #define SC2731_PWR_WR_PROT 0xf0c |
17 | #define SC2731_WR_UNLOCK 0x6e7f | 17 | #define SC2731_WR_UNLOCK_VALUE 0x6e7f |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * SC2731 enable register | 20 | * SC2731 enable register |
@@ -203,8 +203,8 @@ static struct regulator_desc regulators[] = { | |||
203 | 203 | ||
204 | static int sc2731_regulator_unlock(struct regmap *regmap) | 204 | static int sc2731_regulator_unlock(struct regmap *regmap) |
205 | { | 205 | { |
206 | return regmap_write(regmap, SC2731_PWR_WR_PROT_VALUE, | 206 | return regmap_write(regmap, SC2731_PWR_WR_PROT, |
207 | SC2731_WR_UNLOCK); | 207 | SC2731_WR_UNLOCK_VALUE); |
208 | } | 208 | } |
209 | 209 | ||
210 | static int sc2731_regulator_probe(struct platform_device *pdev) | 210 | static int sc2731_regulator_probe(struct platform_device *pdev) |