Commit 469869d1 authored by Rob Herring's avatar Rob Herring Committed by Daniel Lezcano

clocksource: Convert to using %pOF instead of full_name

Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: default avatarMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Acked-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent ebbe2665
...@@ -26,13 +26,13 @@ static int __init tango_clocksource_init(struct device_node *np) ...@@ -26,13 +26,13 @@ static int __init tango_clocksource_init(struct device_node *np)
xtal_in_cnt = of_iomap(np, 0); xtal_in_cnt = of_iomap(np, 0);
if (xtal_in_cnt == NULL) { if (xtal_in_cnt == NULL) {
pr_err("%s: invalid address\n", np->full_name); pr_err("%pOF: invalid address\n", np);
return -ENXIO; return -ENXIO;
} }
clk = of_clk_get(np, 0); clk = of_clk_get(np, 0);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_err("%s: invalid clock\n", np->full_name); pr_err("%pOF: invalid clock\n", np);
return PTR_ERR(clk); return PTR_ERR(clk);
} }
...@@ -43,7 +43,7 @@ static int __init tango_clocksource_init(struct device_node *np) ...@@ -43,7 +43,7 @@ static int __init tango_clocksource_init(struct device_node *np)
ret = clocksource_mmio_init(xtal_in_cnt, "tango-xtal", xtal_freq, 350, ret = clocksource_mmio_init(xtal_in_cnt, "tango-xtal", xtal_freq, 350,
32, clocksource_mmio_readl_up); 32, clocksource_mmio_readl_up);
if (ret) { if (ret) {
pr_err("%s: registration failed\n", np->full_name); pr_err("%pOF: registration failed\n", np);
return ret; return ret;
} }
......
...@@ -52,7 +52,7 @@ static __init int timer_irq_init(struct device_node *np, ...@@ -52,7 +52,7 @@ static __init int timer_irq_init(struct device_node *np,
of_irq->irq = irq_of_parse_and_map(np, of_irq->index); of_irq->irq = irq_of_parse_and_map(np, of_irq->index);
} }
if (!of_irq->irq) { if (!of_irq->irq) {
pr_err("Failed to map interrupt for %s\n", np->full_name); pr_err("Failed to map interrupt for %pOF\n", np);
return -EINVAL; return -EINVAL;
} }
...@@ -63,8 +63,7 @@ static __init int timer_irq_init(struct device_node *np, ...@@ -63,8 +63,7 @@ static __init int timer_irq_init(struct device_node *np,
of_irq->flags ? of_irq->flags : IRQF_TIMER, of_irq->flags ? of_irq->flags : IRQF_TIMER,
np->full_name, clkevt); np->full_name, clkevt);
if (ret) { if (ret) {
pr_err("Failed to request irq %d for %s\n", of_irq->irq, pr_err("Failed to request irq %d for %pOF\n", of_irq->irq, np);
np->full_name);
return ret; return ret;
} }
...@@ -88,20 +87,20 @@ static __init int timer_clk_init(struct device_node *np, ...@@ -88,20 +87,20 @@ static __init int timer_clk_init(struct device_node *np,
of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) : of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) :
of_clk_get(np, of_clk->index); of_clk_get(np, of_clk->index);
if (IS_ERR(of_clk->clk)) { if (IS_ERR(of_clk->clk)) {
pr_err("Failed to get clock for %s\n", np->full_name); pr_err("Failed to get clock for %pOF\n", np);
return PTR_ERR(of_clk->clk); return PTR_ERR(of_clk->clk);
} }
ret = clk_prepare_enable(of_clk->clk); ret = clk_prepare_enable(of_clk->clk);
if (ret) { if (ret) {
pr_err("Failed for enable clock for %s\n", np->full_name); pr_err("Failed for enable clock for %pOF\n", np);
goto out_clk_put; goto out_clk_put;
} }
of_clk->rate = clk_get_rate(of_clk->clk); of_clk->rate = clk_get_rate(of_clk->clk);
if (!of_clk->rate) { if (!of_clk->rate) {
ret = -EINVAL; ret = -EINVAL;
pr_err("Failed to get clock rate for %s\n", np->full_name); pr_err("Failed to get clock rate for %pOF\n", np);
goto out_clk_disable; goto out_clk_disable;
} }
......
...@@ -40,8 +40,7 @@ void __init timer_probe(void) ...@@ -40,8 +40,7 @@ void __init timer_probe(void)
ret = init_func_ret(np); ret = init_func_ret(np);
if (ret) { if (ret) {
pr_err("Failed to initialize '%s': %d\n", pr_err("Failed to initialize '%pOF': %d\n", np, ret);
of_node_full_name(np), ret);
continue; continue;
} }
......
...@@ -138,7 +138,7 @@ static int __init stm32_clockevent_init(struct device_node *np) ...@@ -138,7 +138,7 @@ static int __init stm32_clockevent_init(struct device_node *np)
irq = irq_of_parse_and_map(np, 0); irq = irq_of_parse_and_map(np, 0);
if (!irq) { if (!irq) {
ret = -EINVAL; ret = -EINVAL;
pr_err("%s: failed to get irq.\n", np->full_name); pr_err("%pOF: failed to get irq.\n", np);
goto err_get_irq; goto err_get_irq;
} }
...@@ -168,12 +168,12 @@ static int __init stm32_clockevent_init(struct device_node *np) ...@@ -168,12 +168,12 @@ static int __init stm32_clockevent_init(struct device_node *np)
ret = request_irq(irq, stm32_clock_event_handler, IRQF_TIMER, ret = request_irq(irq, stm32_clock_event_handler, IRQF_TIMER,
"stm32 clockevent", data); "stm32 clockevent", data);
if (ret) { if (ret) {
pr_err("%s: failed to request irq.\n", np->full_name); pr_err("%pOF: failed to request irq.\n", np);
goto err_get_irq; goto err_get_irq;
} }
pr_info("%s: STM32 clockevent driver initialized (%d bits)\n", pr_info("%pOF: STM32 clockevent driver initialized (%d bits)\n",
np->full_name, bits); np, bits);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment