diff mbox

[5/8] regulator: max77686: Initialize opmode explicitly to normal mode

Message ID 1414422226-10948-6-git-send-email-k.kozlowski@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Krzysztof Kozlowski Oct. 27, 2014, 3:03 p.m. UTC
Minor nit: Initialize the opmode for each regulator to normal mode in a
readable explicit way.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Suggested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/regulator/max77686.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Javier Martinez Canillas Oct. 27, 2014, 7:51 p.m. UTC | #1
Hello Krzysztof,

On 10/27/2014 04:03 PM, Krzysztof Kozlowski wrote:
> Minor nit: Initialize the opmode for each regulator to normal mode in a
> readable explicit way.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Suggested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  drivers/regulator/max77686.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
> index 7930b4f82c0b..e5738c363f07 100644
> --- a/drivers/regulator/max77686.c
> +++ b/drivers/regulator/max77686.c
> @@ -507,8 +507,8 @@ static int max77686_pmic_probe(struct platform_device *pdev)
>  		config.init_data = max77686->regulators[i].initdata;
>  		config.of_node = max77686->regulators[i].of_node;
>  
> -		max77686->opmode[i] = regulators[i].enable_mask >>
> -						max77686_get_opmode_shift(i);
> +		max77686->opmode[i] = MAX77686_NORMAL;
> +
>  		rdev = devm_regulator_register(&pdev->dev,
>  						&regulators[i], &config);
>  		if (IS_ERR(rdev)) {
> 

Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index 7930b4f82c0b..e5738c363f07 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -507,8 +507,8 @@  static int max77686_pmic_probe(struct platform_device *pdev)
 		config.init_data = max77686->regulators[i].initdata;
 		config.of_node = max77686->regulators[i].of_node;
 
-		max77686->opmode[i] = regulators[i].enable_mask >>
-						max77686_get_opmode_shift(i);
+		max77686->opmode[i] = MAX77686_NORMAL;
+
 		rdev = devm_regulator_register(&pdev->dev,
 						&regulators[i], &config);
 		if (IS_ERR(rdev)) {