diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-02-18 13:19:10 -0500 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2016-03-08 17:21:41 -0500 |
commit | 4d3583cd1cb1a51825f195b2cfe8b855827803eb (patch) | |
tree | 4864a2d579886cf6674ec8ea9059636d93bbb768 | |
parent | 7bc40ddfe807b07bd54193791296a3a9448280de (diff) |
thermal: exynos: Use devm_regulator_get_optional() for vtmu
The Exynos TMU DT binding says that the vtmu-supply is optional but the
driver uses devm_regulator_get() that creates a dummy regulator if it's
not defined in the DT. For example the following message is in the log:
10060000.tmu supply vtmu not found, using dummy regulator
Use the optional version of regulator_get() that doesn't create a dummy
regulator and instead returns a -ENODEV errno code. Since it's expected
that a regulator may not be defined and the driver will inform about it:
exynos-tmu 10060000.tmu: Regulator node (vtmu) not found
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 6c6f59ba7423..f4f36bba7be9 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
@@ -1310,7 +1310,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) | |||
1310 | * TODO: Add regulator as an SOC feature, so that regulator enable | 1310 | * TODO: Add regulator as an SOC feature, so that regulator enable |
1311 | * is a compulsory call. | 1311 | * is a compulsory call. |
1312 | */ | 1312 | */ |
1313 | data->regulator = devm_regulator_get(&pdev->dev, "vtmu"); | 1313 | data->regulator = devm_regulator_get_optional(&pdev->dev, "vtmu"); |
1314 | if (!IS_ERR(data->regulator)) { | 1314 | if (!IS_ERR(data->regulator)) { |
1315 | ret = regulator_enable(data->regulator); | 1315 | ret = regulator_enable(data->regulator); |
1316 | if (ret) { | 1316 | if (ret) { |