mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
clk: samsung: Add local variable to match its purpose
Add new variable to avoid using clk pointer for different purposes across the exynos_register_cpu_clock() function. This will help in future rewrite for the new clk_hw API. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
This commit is contained in:
parent
9f57fd6ee4
commit
7288de7451
@ -410,6 +410,7 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx,
|
|||||||
{
|
{
|
||||||
struct exynos_cpuclk *cpuclk;
|
struct exynos_cpuclk *cpuclk;
|
||||||
struct clk_init_data init;
|
struct clk_init_data init;
|
||||||
|
struct clk *parent_clk;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -440,15 +441,15 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx,
|
|||||||
goto free_cpuclk;
|
goto free_cpuclk;
|
||||||
}
|
}
|
||||||
|
|
||||||
clk = __clk_lookup(parent);
|
parent_clk = __clk_lookup(parent);
|
||||||
if (!clk) {
|
if (!parent_clk) {
|
||||||
pr_err("%s: could not lookup parent clock %s\n",
|
pr_err("%s: could not lookup parent clock %s\n",
|
||||||
__func__, parent);
|
__func__, parent);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto free_cpuclk;
|
goto free_cpuclk;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = clk_notifier_register(clk, &cpuclk->clk_nb);
|
ret = clk_notifier_register(parent_clk, &cpuclk->clk_nb);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("%s: failed to register clock notifier for %s\n",
|
pr_err("%s: failed to register clock notifier for %s\n",
|
||||||
__func__, name);
|
__func__, name);
|
||||||
@ -476,7 +477,7 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx,
|
|||||||
free_cpuclk_data:
|
free_cpuclk_data:
|
||||||
kfree(cpuclk->cfg);
|
kfree(cpuclk->cfg);
|
||||||
unregister_clk_nb:
|
unregister_clk_nb:
|
||||||
clk_notifier_unregister(__clk_lookup(parent), &cpuclk->clk_nb);
|
clk_notifier_unregister(parent_clk, &cpuclk->clk_nb);
|
||||||
free_cpuclk:
|
free_cpuclk:
|
||||||
kfree(cpuclk);
|
kfree(cpuclk);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user