From: Danny Huang Date: Wed, 1 Dec 2010 20:37:30 +0000 (-0700) Subject: regulator: tps6586x: Handle both enable reg/bits being the same X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1dbcf35cb5b775e564a793a338c7c3eb65fc6980;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git regulator: tps6586x: Handle both enable reg/bits being the same Change-Id: I40400bb65eab496bb1becd26b37a9653b99d4f41 Signed-off-by: Danny Huang Signed-off-by: Olof Johansson Signed-off-by: Stephen Warren Acked-by: Mark Brown (Split into separate patches) Signed-off-by: Liam Girdwood --- diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index effa6770ead3..c668944dc3ad 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -297,6 +297,10 @@ static inline int tps6586x_regulator_preinit(struct device *parent, uint8_t val1, val2; int ret; + if (ri->enable_reg[0] == ri->enable_reg[1] && + ri->enable_bit[0] == ri->enable_bit[1]) + return 0; + ret = tps6586x_read(parent, ri->enable_reg[0], &val1); if (ret) return ret;