Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a4849d2 authored by Rob Herring's avatar Rob Herring Committed by Daniel Lezcano
Browse files

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: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent dc625310
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	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);
	}

+1 −1
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ static int __init ttc_timer_init(struct device_node *timer)
	if (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;
}
+4 −4
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static void __init timer_get_base_and_rate(struct device_node *np,
	*base = of_iomap(np, 0);

	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
@@ -42,8 +42,8 @@ static void __init timer_get_base_and_rate(struct device_node *np,
	pclk = of_clk_get_by_name(np, "pclk");
	if (!IS_ERR(pclk))
		if (clk_prepare_enable(pclk))
			pr_warn("pclk for %s is present, but could not be activated\n",
				np->name);
			pr_warn("pclk for %pOFn is present, but could not be activated\n",
				np);

	timer_clk = of_clk_get_by_name(np, "timer");
	if (IS_ERR(timer_clk))
@@ -57,7 +57,7 @@ static void __init timer_get_base_and_rate(struct device_node *np,
try_clock_freq:
	if (of_property_read_u32(np, "clock-freq", 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)
+3 −3
Original line number Diff line number Diff line
@@ -191,13 +191,13 @@ static int __init pxa_timer_dt_init(struct device_node *np)
	/* timer registers are shared with watchdog timer */
	timer_base = of_iomap(np, 0);
	if (!timer_base) {
		pr_err("%s: unable to map resource\n", np->name);
		pr_err("%pOFn: unable to map resource\n", np);
		return -ENXIO;
	}

	clk = of_clk_get(np, 0);
	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);
	}

@@ -210,7 +210,7 @@ static int __init pxa_timer_dt_init(struct device_node *np)
	/* we are only interested in OS-timer0 irq */
	irq = irq_of_parse_and_map(np, 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;
	}

+4 −4
Original line number Diff line number Diff line
@@ -129,13 +129,13 @@ static int __init orion_timer_init(struct device_node *np)
	/* timer registers are shared with watchdog timer */
	timer_base = of_iomap(np, 0);
	if (!timer_base) {
		pr_err("%s: unable to map resource\n", np->name);
		pr_err("%pOFn: unable to map resource\n", np);
		return -ENXIO;
	}

	clk = of_clk_get(np, 0);
	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);
	}

@@ -148,7 +148,7 @@ static int __init orion_timer_init(struct device_node *np)
	/* we are only interested in timer1 irq */
	irq = irq_of_parse_and_map(np, 1);
	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;
	}

@@ -174,7 +174,7 @@ static int __init orion_timer_init(struct device_node *np)
	/* setup timer1 as clockevent timer */
	ret = setup_irq(irq, &orion_clkevt_irq);
	if (ret) {
		pr_err("%s: unable to setup irq\n", np->name);
		pr_err("%pOFn: unable to setup irq\n", np);
		return ret;
	}

Loading