mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
cpufreq: s5pv210: Use dev_err instead of pr_err in probe
dev_err() allows easily to identify the device printing the message so no need for __func__. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> [ Viresh: Don't remove update to result variable ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
committed by
Viresh Kumar
parent
629238068e
commit
77c6d5cd93
@@ -616,8 +616,7 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "samsung,s5pv210-clock");
|
np = of_find_compatible_node(NULL, NULL, "samsung,s5pv210-clock");
|
||||||
if (!np) {
|
if (!np) {
|
||||||
pr_err("%s: failed to find clock controller DT node\n",
|
dev_err(dev, "failed to find clock controller DT node\n");
|
||||||
__func__);
|
|
||||||
result = -ENODEV;
|
result = -ENODEV;
|
||||||
goto err_clock;
|
goto err_clock;
|
||||||
}
|
}
|
||||||
@@ -625,7 +624,7 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)
|
|||||||
clk_base = of_iomap(np, 0);
|
clk_base = of_iomap(np, 0);
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
if (!clk_base) {
|
if (!clk_base) {
|
||||||
pr_err("%s: failed to map clock registers\n", __func__);
|
dev_err(dev, "failed to map clock registers\n");
|
||||||
result = -EFAULT;
|
result = -EFAULT;
|
||||||
goto err_clock;
|
goto err_clock;
|
||||||
}
|
}
|
||||||
@@ -633,8 +632,7 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)
|
|||||||
for_each_compatible_node(np, NULL, "samsung,s5pv210-dmc") {
|
for_each_compatible_node(np, NULL, "samsung,s5pv210-dmc") {
|
||||||
id = of_alias_get_id(np, "dmc");
|
id = of_alias_get_id(np, "dmc");
|
||||||
if (id < 0 || id >= ARRAY_SIZE(dmc_base)) {
|
if (id < 0 || id >= ARRAY_SIZE(dmc_base)) {
|
||||||
pr_err("%s: failed to get alias of dmc node '%pOFn'\n",
|
dev_err(dev, "failed to get alias of dmc node '%pOFn'\n", np);
|
||||||
__func__, np);
|
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
result = id;
|
result = id;
|
||||||
goto err_clk_base;
|
goto err_clk_base;
|
||||||
@@ -642,8 +640,7 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
dmc_base[id] = of_iomap(np, 0);
|
dmc_base[id] = of_iomap(np, 0);
|
||||||
if (!dmc_base[id]) {
|
if (!dmc_base[id]) {
|
||||||
pr_err("%s: failed to map dmc%d registers\n",
|
dev_err(dev, "failed to map dmc%d registers\n", id);
|
||||||
__func__, id);
|
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
result = -EFAULT;
|
result = -EFAULT;
|
||||||
goto err_dmc;
|
goto err_dmc;
|
||||||
@@ -652,7 +649,7 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
for (id = 0; id < ARRAY_SIZE(dmc_base); ++id) {
|
for (id = 0; id < ARRAY_SIZE(dmc_base); ++id) {
|
||||||
if (!dmc_base[id]) {
|
if (!dmc_base[id]) {
|
||||||
pr_err("%s: failed to find dmc%d node\n", __func__, id);
|
dev_err(dev, "failed to find dmc%d node\n", id);
|
||||||
result = -ENODEV;
|
result = -ENODEV;
|
||||||
goto err_dmc;
|
goto err_dmc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user