diff options
author | Rob Herring <robh@kernel.org> | 2018-08-27 21:52:14 -0400 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2018-10-03 08:36:52 -0400 |
commit | 2a4849d2674b965cd9eb7e6c010b7c240fb9d218 (patch) | |
tree | 4faea091056a0881cf1c362e9df09251c39c3506 | |
parent | dc6253108f0fbff4a634055d5b8a91958ec2af81 (diff) |
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>
-rw-r--r-- | drivers/clocksource/asm9260_timer.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/cadence_ttc_timer.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/dw_apb_timer_of.c | 8 | ||||
-rw-r--r-- | drivers/clocksource/pxa_timer.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/time-orion.c | 8 | ||||
-rw-r--r-- | drivers/clocksource/timer-integrator-ap.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/timer-sp804.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/zevio-timer.c | 8 |
8 files changed, 19 insertions, 19 deletions
diff --git a/drivers/clocksource/asm9260_timer.c b/drivers/clocksource/asm9260_timer.c index 38cd2feb87c4..fbaee04fd1d9 100644 --- a/drivers/clocksource/asm9260_timer.c +++ b/drivers/clocksource/asm9260_timer.c | |||
@@ -193,7 +193,7 @@ static int __init asm9260_timer_init(struct device_node *np) | |||
193 | 193 | ||
194 | priv.base = of_io_request_and_map(np, 0, np->name); | 194 | priv.base = of_io_request_and_map(np, 0, np->name); |
195 | if (IS_ERR(priv.base)) { | 195 | if (IS_ERR(priv.base)) { |
196 | pr_err("%s: unable to map resource\n", np->name); | 196 | pr_err("%pOFn: unable to map resource\n", np); |
197 | return PTR_ERR(priv.base); | 197 | return PTR_ERR(priv.base); |
198 | } | 198 | } |
199 | 199 | ||
diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c index 29d51755e18b..b33402980b6f 100644 --- a/drivers/clocksource/cadence_ttc_timer.c +++ b/drivers/clocksource/cadence_ttc_timer.c | |||
@@ -535,7 +535,7 @@ static int __init ttc_timer_init(struct device_node *timer) | |||
535 | if (ret) | 535 | if (ret) |
536 | return ret; | 536 | return ret; |
537 | 537 | ||
538 | pr_info("%s #0 at %p, irq=%d\n", timer->name, timer_baseaddr, irq); | 538 | pr_info("%pOFn #0 at %p, irq=%d\n", timer, timer_baseaddr, irq); |
539 | 539 | ||
540 | return 0; | 540 | return 0; |
541 | } | 541 | } |
diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c index 69866cd8f4bb..fabaa29cc3a4 100644 --- a/drivers/clocksource/dw_apb_timer_of.c +++ b/drivers/clocksource/dw_apb_timer_of.c | |||
@@ -33,7 +33,7 @@ static void __init timer_get_base_and_rate(struct device_node *np, | |||
33 | *base = of_iomap(np, 0); | 33 | *base = of_iomap(np, 0); |
34 | 34 | ||
35 | if (!*base) | 35 | if (!*base) |
36 | panic("Unable to map regs for %s", np->name); | 36 | panic("Unable to map regs for %pOFn", np); |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Not all implementations use a periphal clock, so don't panic | 39 | * 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, | |||
42 | pclk = of_clk_get_by_name(np, "pclk"); | 42 | pclk = of_clk_get_by_name(np, "pclk"); |
43 | if (!IS_ERR(pclk)) | 43 | if (!IS_ERR(pclk)) |
44 | if (clk_prepare_enable(pclk)) | 44 | if (clk_prepare_enable(pclk)) |
45 | pr_warn("pclk for %s is present, but could not be activated\n", | 45 | pr_warn("pclk for %pOFn is present, but could not be activated\n", |
46 | np->name); | 46 | np); |
47 | 47 | ||
48 | timer_clk = of_clk_get_by_name(np, "timer"); | 48 | timer_clk = of_clk_get_by_name(np, "timer"); |
49 | if (IS_ERR(timer_clk)) | 49 | if (IS_ERR(timer_clk)) |
@@ -57,7 +57,7 @@ static void __init timer_get_base_and_rate(struct device_node *np, | |||
57 | try_clock_freq: | 57 | try_clock_freq: |
58 | if (of_property_read_u32(np, "clock-freq", rate) && | 58 | if (of_property_read_u32(np, "clock-freq", rate) && |
59 | of_property_read_u32(np, "clock-frequency", rate)) | 59 | of_property_read_u32(np, "clock-frequency", rate)) |
60 | panic("No clock nor clock-frequency property for %s", np->name); | 60 | panic("No clock nor clock-frequency property for %pOFn", np); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void __init add_clockevent(struct device_node *event_timer) | 63 | static void __init add_clockevent(struct device_node *event_timer) |
diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c index 08cd6eaf3795..395837938301 100644 --- a/drivers/clocksource/pxa_timer.c +++ b/drivers/clocksource/pxa_timer.c | |||
@@ -191,13 +191,13 @@ static int __init pxa_timer_dt_init(struct device_node *np) | |||
191 | /* timer registers are shared with watchdog timer */ | 191 | /* timer registers are shared with watchdog timer */ |
192 | timer_base = of_iomap(np, 0); | 192 | timer_base = of_iomap(np, 0); |
193 | if (!timer_base) { | 193 | if (!timer_base) { |
194 | pr_err("%s: unable to map resource\n", np->name); | 194 | pr_err("%pOFn: unable to map resource\n", np); |
195 | return -ENXIO; | 195 | return -ENXIO; |
196 | } | 196 | } |
197 | 197 | ||
198 | clk = of_clk_get(np, 0); | 198 | clk = of_clk_get(np, 0); |
199 | if (IS_ERR(clk)) { | 199 | if (IS_ERR(clk)) { |
200 | pr_crit("%s: unable to get clk\n", np->name); | 200 | pr_crit("%pOFn: unable to get clk\n", np); |
201 | return PTR_ERR(clk); | 201 | return PTR_ERR(clk); |
202 | } | 202 | } |
203 | 203 | ||
@@ -210,7 +210,7 @@ static int __init pxa_timer_dt_init(struct device_node *np) | |||
210 | /* we are only interested in OS-timer0 irq */ | 210 | /* we are only interested in OS-timer0 irq */ |
211 | irq = irq_of_parse_and_map(np, 0); | 211 | irq = irq_of_parse_and_map(np, 0); |
212 | if (irq <= 0) { | 212 | if (irq <= 0) { |
213 | pr_crit("%s: unable to parse OS-timer0 irq\n", np->name); | 213 | pr_crit("%pOFn: unable to parse OS-timer0 irq\n", np); |
214 | return -EINVAL; | 214 | return -EINVAL; |
215 | } | 215 | } |
216 | 216 | ||
diff --git a/drivers/clocksource/time-orion.c b/drivers/clocksource/time-orion.c index 12202067fe4b..7d487107e3cd 100644 --- a/drivers/clocksource/time-orion.c +++ b/drivers/clocksource/time-orion.c | |||
@@ -129,13 +129,13 @@ static int __init orion_timer_init(struct device_node *np) | |||
129 | /* timer registers are shared with watchdog timer */ | 129 | /* timer registers are shared with watchdog timer */ |
130 | timer_base = of_iomap(np, 0); | 130 | timer_base = of_iomap(np, 0); |
131 | if (!timer_base) { | 131 | if (!timer_base) { |
132 | pr_err("%s: unable to map resource\n", np->name); | 132 | pr_err("%pOFn: unable to map resource\n", np); |
133 | return -ENXIO; | 133 | return -ENXIO; |
134 | } | 134 | } |
135 | 135 | ||
136 | clk = of_clk_get(np, 0); | 136 | clk = of_clk_get(np, 0); |
137 | if (IS_ERR(clk)) { | 137 | if (IS_ERR(clk)) { |
138 | pr_err("%s: unable to get clk\n", np->name); | 138 | pr_err("%pOFn: unable to get clk\n", np); |
139 | return PTR_ERR(clk); | 139 | return PTR_ERR(clk); |
140 | } | 140 | } |
141 | 141 | ||
@@ -148,7 +148,7 @@ static int __init orion_timer_init(struct device_node *np) | |||
148 | /* we are only interested in timer1 irq */ | 148 | /* we are only interested in timer1 irq */ |
149 | irq = irq_of_parse_and_map(np, 1); | 149 | irq = irq_of_parse_and_map(np, 1); |
150 | if (irq <= 0) { | 150 | if (irq <= 0) { |
151 | pr_err("%s: unable to parse timer1 irq\n", np->name); | 151 | pr_err("%pOFn: unable to parse timer1 irq\n", np); |
152 | return -EINVAL; | 152 | return -EINVAL; |
153 | } | 153 | } |
154 | 154 | ||
@@ -174,7 +174,7 @@ static int __init orion_timer_init(struct device_node *np) | |||
174 | /* setup timer1 as clockevent timer */ | 174 | /* setup timer1 as clockevent timer */ |
175 | ret = setup_irq(irq, &orion_clkevt_irq); | 175 | ret = setup_irq(irq, &orion_clkevt_irq); |
176 | if (ret) { | 176 | if (ret) { |
177 | pr_err("%s: unable to setup irq\n", np->name); | 177 | pr_err("%pOFn: unable to setup irq\n", np); |
178 | return ret; | 178 | return ret; |
179 | } | 179 | } |
180 | 180 | ||
diff --git a/drivers/clocksource/timer-integrator-ap.c b/drivers/clocksource/timer-integrator-ap.c index 62d24690ba02..76e526f58620 100644 --- a/drivers/clocksource/timer-integrator-ap.c +++ b/drivers/clocksource/timer-integrator-ap.c | |||
@@ -190,7 +190,7 @@ static int __init integrator_ap_timer_init_of(struct device_node *node) | |||
190 | 190 | ||
191 | clk = of_clk_get(node, 0); | 191 | clk = of_clk_get(node, 0); |
192 | if (IS_ERR(clk)) { | 192 | if (IS_ERR(clk)) { |
193 | pr_err("No clock for %s\n", node->name); | 193 | pr_err("No clock for %pOFn\n", node); |
194 | return PTR_ERR(clk); | 194 | return PTR_ERR(clk); |
195 | } | 195 | } |
196 | clk_prepare_enable(clk); | 196 | clk_prepare_enable(clk); |
diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c index e01222ea888f..052b230ca312 100644 --- a/drivers/clocksource/timer-sp804.c +++ b/drivers/clocksource/timer-sp804.c | |||
@@ -249,7 +249,7 @@ static int __init sp804_of_init(struct device_node *np) | |||
249 | if (of_clk_get_parent_count(np) == 3) { | 249 | if (of_clk_get_parent_count(np) == 3) { |
250 | clk2 = of_clk_get(np, 1); | 250 | clk2 = of_clk_get(np, 1); |
251 | if (IS_ERR(clk2)) { | 251 | if (IS_ERR(clk2)) { |
252 | pr_err("sp804: %s clock not found: %d\n", np->name, | 252 | pr_err("sp804: %pOFn clock not found: %d\n", np, |
253 | (int)PTR_ERR(clk2)); | 253 | (int)PTR_ERR(clk2)); |
254 | clk2 = NULL; | 254 | clk2 = NULL; |
255 | } | 255 | } |
diff --git a/drivers/clocksource/zevio-timer.c b/drivers/clocksource/zevio-timer.c index f74689334f7c..6127e8062a71 100644 --- a/drivers/clocksource/zevio-timer.c +++ b/drivers/clocksource/zevio-timer.c | |||
@@ -148,12 +148,12 @@ static int __init zevio_timer_add(struct device_node *node) | |||
148 | 148 | ||
149 | of_address_to_resource(node, 0, &res); | 149 | of_address_to_resource(node, 0, &res); |
150 | scnprintf(timer->clocksource_name, sizeof(timer->clocksource_name), | 150 | scnprintf(timer->clocksource_name, sizeof(timer->clocksource_name), |
151 | "%llx.%s_clocksource", | 151 | "%llx.%pOFn_clocksource", |
152 | (unsigned long long)res.start, node->name); | 152 | (unsigned long long)res.start, node); |
153 | 153 | ||
154 | scnprintf(timer->clockevent_name, sizeof(timer->clockevent_name), | 154 | scnprintf(timer->clockevent_name, sizeof(timer->clockevent_name), |
155 | "%llx.%s_clockevent", | 155 | "%llx.%pOFn_clockevent", |
156 | (unsigned long long)res.start, node->name); | 156 | (unsigned long long)res.start, node); |
157 | 157 | ||
158 | if (timer->interrupt_regs && irqnr) { | 158 | if (timer->interrupt_regs && irqnr) { |
159 | timer->clkevt.name = timer->clockevent_name; | 159 | timer->clkevt.name = timer->clockevent_name; |