clocksource: Convert to using %pOFn instead of device_node.name

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
Rob Herring 2018-08-27 20:52:14 -05:00 committed by Daniel Lezcano
parent dc6253108f
commit 2a4849d267
8 changed files with 19 additions and 19 deletions

View File

@ -193,7 +193,7 @@ static int __init asm9260_timer_init(struct device_node *np)
priv.base = of_io_request_and_map(np, 0, np->name); priv.base = of_io_request_and_map(np, 0, np->name);
if (IS_ERR(priv.base)) { if (IS_ERR(priv.base)) {
pr_err("%s: unable to map resource\n", np->name); pr_err("%pOFn: unable to map resource\n", np);
return PTR_ERR(priv.base); return PTR_ERR(priv.base);
} }

View File

@ -535,7 +535,7 @@ static int __init ttc_timer_init(struct device_node *timer)
if (ret) if (ret)
return ret; return ret;
pr_info("%s #0 at %p, irq=%d\n", timer->name, timer_baseaddr, irq); pr_info("%pOFn #0 at %p, irq=%d\n", timer, timer_baseaddr, irq);
return 0; return 0;
} }

View File

@ -33,7 +33,7 @@ static void __init timer_get_base_and_rate(struct device_node *np,
*base = of_iomap(np, 0); *base = of_iomap(np, 0);
if (!*base) if (!*base)
panic("Unable to map regs for %s", np->name); panic("Unable to map regs for %pOFn", np);
/* /*
* Not all implementations use a periphal clock, so don't panic * Not all implementations use a periphal clock, so don't panic
@ -42,8 +42,8 @@ static void __init timer_get_base_and_rate(struct device_node *np,
pclk = of_clk_get_by_name(np, "pclk"); pclk = of_clk_get_by_name(np, "pclk");
if (!IS_ERR(pclk)) if (!IS_ERR(pclk))
if (clk_prepare_enable(pclk)) if (clk_prepare_enable(pclk))
pr_warn("pclk for %s is present, but could not be activated\n", pr_warn("pclk for %pOFn is present, but could not be activated\n",
np->name); np);
timer_clk = of_clk_get_by_name(np, "timer"); timer_clk = of_clk_get_by_name(np, "timer");
if (IS_ERR(timer_clk)) if (IS_ERR(timer_clk))
@ -57,7 +57,7 @@ static void __init timer_get_base_and_rate(struct device_node *np,
try_clock_freq: try_clock_freq:
if (of_property_read_u32(np, "clock-freq", rate) && if (of_property_read_u32(np, "clock-freq", rate) &&
of_property_read_u32(np, "clock-frequency", rate)) of_property_read_u32(np, "clock-frequency", rate))
panic("No clock nor clock-frequency property for %s", np->name); panic("No clock nor clock-frequency property for %pOFn", np);
} }
static void __init add_clockevent(struct device_node *event_timer) static void __init add_clockevent(struct device_node *event_timer)

View File

@ -191,13 +191,13 @@ static int __init pxa_timer_dt_init(struct device_node *np)
/* timer registers are shared with watchdog timer */ /* timer registers are shared with watchdog timer */
timer_base = of_iomap(np, 0); timer_base = of_iomap(np, 0);
if (!timer_base) { if (!timer_base) {
pr_err("%s: unable to map resource\n", np->name); pr_err("%pOFn: unable to map resource\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_crit("%s: unable to get clk\n", np->name); pr_crit("%pOFn: unable to get clk\n", np);
return PTR_ERR(clk); return PTR_ERR(clk);
} }
@ -210,7 +210,7 @@ static int __init pxa_timer_dt_init(struct device_node *np)
/* we are only interested in OS-timer0 irq */ /* we are only interested in OS-timer0 irq */
irq = irq_of_parse_and_map(np, 0); irq = irq_of_parse_and_map(np, 0);
if (irq <= 0) { if (irq <= 0) {
pr_crit("%s: unable to parse OS-timer0 irq\n", np->name); pr_crit("%pOFn: unable to parse OS-timer0 irq\n", np);
return -EINVAL; return -EINVAL;
} }

View File

@ -129,13 +129,13 @@ static int __init orion_timer_init(struct device_node *np)
/* timer registers are shared with watchdog timer */ /* timer registers are shared with watchdog timer */
timer_base = of_iomap(np, 0); timer_base = of_iomap(np, 0);
if (!timer_base) { if (!timer_base) {
pr_err("%s: unable to map resource\n", np->name); pr_err("%pOFn: unable to map resource\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: unable to get clk\n", np->name); pr_err("%pOFn: unable to get clk\n", np);
return PTR_ERR(clk); return PTR_ERR(clk);
} }
@ -148,7 +148,7 @@ static int __init orion_timer_init(struct device_node *np)
/* we are only interested in timer1 irq */ /* we are only interested in timer1 irq */
irq = irq_of_parse_and_map(np, 1); irq = irq_of_parse_and_map(np, 1);
if (irq <= 0) { if (irq <= 0) {
pr_err("%s: unable to parse timer1 irq\n", np->name); pr_err("%pOFn: unable to parse timer1 irq\n", np);
return -EINVAL; return -EINVAL;
} }
@ -174,7 +174,7 @@ static int __init orion_timer_init(struct device_node *np)
/* setup timer1 as clockevent timer */ /* setup timer1 as clockevent timer */
ret = setup_irq(irq, &orion_clkevt_irq); ret = setup_irq(irq, &orion_clkevt_irq);
if (ret) { if (ret) {
pr_err("%s: unable to setup irq\n", np->name); pr_err("%pOFn: unable to setup irq\n", np);
return ret; return ret;
} }

View File

@ -190,7 +190,7 @@ static int __init integrator_ap_timer_init_of(struct device_node *node)
clk = of_clk_get(node, 0); clk = of_clk_get(node, 0);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_err("No clock for %s\n", node->name); pr_err("No clock for %pOFn\n", node);
return PTR_ERR(clk); return PTR_ERR(clk);
} }
clk_prepare_enable(clk); clk_prepare_enable(clk);

View File

@ -249,7 +249,7 @@ static int __init sp804_of_init(struct device_node *np)
if (of_clk_get_parent_count(np) == 3) { if (of_clk_get_parent_count(np) == 3) {
clk2 = of_clk_get(np, 1); clk2 = of_clk_get(np, 1);
if (IS_ERR(clk2)) { if (IS_ERR(clk2)) {
pr_err("sp804: %s clock not found: %d\n", np->name, pr_err("sp804: %pOFn clock not found: %d\n", np,
(int)PTR_ERR(clk2)); (int)PTR_ERR(clk2));
clk2 = NULL; clk2 = NULL;
} }

View File

@ -148,12 +148,12 @@ static int __init zevio_timer_add(struct device_node *node)
of_address_to_resource(node, 0, &res); of_address_to_resource(node, 0, &res);
scnprintf(timer->clocksource_name, sizeof(timer->clocksource_name), scnprintf(timer->clocksource_name, sizeof(timer->clocksource_name),
"%llx.%s_clocksource", "%llx.%pOFn_clocksource",
(unsigned long long)res.start, node->name); (unsigned long long)res.start, node);
scnprintf(timer->clockevent_name, sizeof(timer->clockevent_name), scnprintf(timer->clockevent_name, sizeof(timer->clockevent_name),
"%llx.%s_clockevent", "%llx.%pOFn_clockevent",
(unsigned long long)res.start, node->name); (unsigned long long)res.start, node);
if (timer->interrupt_regs && irqnr) { if (timer->interrupt_regs && irqnr) {
timer->clkevt.name = timer->clockevent_name; timer->clkevt.name = timer->clockevent_name;