]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cpufreq: cpufreq-cpu0: Use devm_regulator_get_optional()
authorMark Brown <broonie@linaro.org>
Fri, 9 Aug 2013 18:07:12 +0000 (19:07 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 13 Aug 2013 16:07:44 +0000 (17:07 +0100)
Since the cpufreq-cpu0 driver is capable of coping without a software
controllable regulator and would be confused by a dummy one it should
use devm_regulator_get_optional() to ensure no dummy is provided.

Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/cpufreq/cpufreq-cpu0.c

index ad1fde277661e617fd4f19e01f34cd963f1349f4..e9dedb27deca77f16e44575038fc9c82ba1d8062 100644 (file)
@@ -197,7 +197,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
        cpu_dev = &pdev->dev;
        cpu_dev->of_node = np;
 
-       cpu_reg = devm_regulator_get(cpu_dev, "cpu0");
+       cpu_reg = devm_regulator_get_optional(cpu_dev, "cpu0");
        if (IS_ERR(cpu_reg)) {
                /*
                 * If cpu0 regulator supply node is present, but regulator is