From: Rabin Vincent Date: Tue, 2 Apr 2013 12:24:08 +0000 (+0100) Subject: regulator: ab8500: Don't register external regulators on AB8505 X-Git-Tag: firefly_0821_release~3680^2~668^2~25^2~34 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f7eae37fcc6e4bdc404692a3e94fc9c51e9c5cb2;p=firefly-linux-kernel-4.4.55.git regulator: ab8500: Don't register external regulators on AB8505 ExtSupply regulators are not included on AB8505 based platforms. Signed-off-by: Rabin Vincent Signed-off-by: Lee Jones Tested-by: Marcus COOPER Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index f89a17a66433..65f9365885a8 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -2777,10 +2777,12 @@ static int ab8500_regulator_probe(struct platform_device *pdev) return err; } - /* register external regulators (before Vaux1, 2 and 3) */ - err = ab8500_ext_regulator_init(pdev); - if (err) - return err; + if (!is_ab8505(ab8500)) { + /* register external regulators (before Vaux1, 2 and 3) */ + err = ab8500_ext_regulator_init(pdev); + if (err) + return err; + } /* register all regulators */ for (i = 0; i < regulator_info_size; i++) { @@ -2822,10 +2824,12 @@ static int ab8500_regulator_remove(struct platform_device *pdev) regulator_unregister(info->regulator); } - /* remove external regulators (after Vaux1, 2 and 3) */ - err = ab8500_ext_regulator_exit(pdev); - if (err) - return err; + if (!is_ab8505(ab8500)) { + /* remove external regulators (after Vaux1, 2 and 3) */ + err = ab8500_ext_regulator_exit(pdev); + if (err) + return err; + } /* remove regulator debug */ err = ab8500_regulator_debug_exit(pdev);