diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-07-01 05:33:21 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-09-03 04:55:43 -0400 |
commit | cffbfe63ec37cdaf8c9ede027759614faadd23cf (patch) | |
tree | 3bf81b8f3ba7944638c51448b584a84ef7018b7f /arch/arm/mach-at91/at91sam926x_time.c | |
parent | a981b29f027ace1b27fb4a96cef6cbfee49dbdd7 (diff) |
ARM: at91: PIT: Use pr_fmt
All the panic messages hardcode the same prefix. Define the pr_fmt macro to
unify its definition.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam926x_time.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam926x_time.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index 641e860e83e7..0abdcb36c555 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) "AT91: PIT: " fmt | ||
14 | |||
13 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
14 | #include <linux/clockchips.h> | 16 | #include <linux/clockchips.h> |
15 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
@@ -208,7 +210,7 @@ static void __init at91sam926x_pit_common_init(void) | |||
208 | /* Set up irq handler */ | 210 | /* Set up irq handler */ |
209 | ret = setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq); | 211 | ret = setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq); |
210 | if (ret) | 212 | if (ret) |
211 | panic("AT91: PIT: Unable to setup IRQ\n"); | 213 | panic(pr_fmt("Unable to setup IRQ\n")); |
212 | 214 | ||
213 | /* Set up and register clockevents */ | 215 | /* Set up and register clockevents */ |
214 | pit_clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, pit_clkevt.shift); | 216 | pit_clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, pit_clkevt.shift); |
@@ -222,7 +224,7 @@ static void __init at91sam926x_pit_dt_init(struct device_node *node) | |||
222 | 224 | ||
223 | pit_base_addr = of_iomap(node, 0); | 225 | pit_base_addr = of_iomap(node, 0); |
224 | if (!pit_base_addr) | 226 | if (!pit_base_addr) |
225 | panic("AT91: PIT: Could not map PIT address\n"); | 227 | panic(pr_fmt("Could not map PIT address\n")); |
226 | 228 | ||
227 | mck = of_clk_get(node, 0); | 229 | mck = of_clk_get(node, 0); |
228 | if (IS_ERR(mck)) | 230 | if (IS_ERR(mck)) |
@@ -230,12 +232,12 @@ static void __init at91sam926x_pit_dt_init(struct device_node *node) | |||
230 | mck = clk_get(NULL, "mck"); | 232 | mck = clk_get(NULL, "mck"); |
231 | 233 | ||
232 | if (IS_ERR(mck)) | 234 | if (IS_ERR(mck)) |
233 | panic("AT91: PIT: Unable to get mck clk\n"); | 235 | panic(pr_fmt("Unable to get mck clk\n")); |
234 | 236 | ||
235 | /* Get the interrupts property */ | 237 | /* Get the interrupts property */ |
236 | irq = irq_of_parse_and_map(node, 0); | 238 | irq = irq_of_parse_and_map(node, 0); |
237 | if (!irq) | 239 | if (!irq) |
238 | panic("AT91: PIT: Unable to get IRQ from DT\n"); | 240 | panic(pr_fmt("Unable to get IRQ from DT\n")); |
239 | 241 | ||
240 | at91sam926x_pit_irq.irq = irq; | 242 | at91sam926x_pit_irq.irq = irq; |
241 | 243 | ||
@@ -248,7 +250,7 @@ void __init at91sam926x_pit_init(void) | |||
248 | { | 250 | { |
249 | mck = clk_get(NULL, "mck"); | 251 | mck = clk_get(NULL, "mck"); |
250 | if (IS_ERR(mck)) | 252 | if (IS_ERR(mck)) |
251 | panic("AT91: PIT: Unable to get mck clk\n"); | 253 | panic(pr_fmt("Unable to get mck clk\n")); |
252 | 254 | ||
253 | at91sam926x_pit_irq.irq = NR_IRQS_LEGACY + AT91_ID_SYS; | 255 | at91sam926x_pit_irq.irq = NR_IRQS_LEGACY + AT91_ID_SYS; |
254 | 256 | ||
@@ -263,5 +265,5 @@ void __init at91sam926x_ioremap_pit(u32 addr) | |||
263 | pit_base_addr = ioremap(addr, 16); | 265 | pit_base_addr = ioremap(addr, 16); |
264 | 266 | ||
265 | if (!pit_base_addr) | 267 | if (!pit_base_addr) |
266 | panic("Impossible to ioremap PIT\n"); | 268 | panic(pr_fmt("Impossible to ioremap PIT\n")); |
267 | } | 269 | } |