diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2013-09-18 09:24:44 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-10-24 06:50:35 -0400 |
commit | f7578496a671a96e501f16a5104893275e32c33a (patch) | |
tree | f1bc2db4847acdea2bb4c777782b29c35c084ae2 /arch/arm/mach-u300/timer.c | |
parent | 3da5278727a895d49a601f67fd49dffa0b80f9a5 (diff) |
of/irq: Use irq_of_parse_and_map()
Replace some instances of of_irq_map_one()/irq_create_of_mapping() and
of_irq_to_resource() by the simpler equivalent irq_of_parse_and_map().
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
[grant.likely: resolved conflicts with core code renames]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch/arm/mach-u300/timer.c')
-rw-r--r-- | arch/arm/mach-u300/timer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index b5db207dfd1e..9a5f9fb352ce 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -358,8 +358,7 @@ static struct delay_timer u300_delay_timer; | |||
358 | */ | 358 | */ |
359 | static void __init u300_timer_init_of(struct device_node *np) | 359 | static void __init u300_timer_init_of(struct device_node *np) |
360 | { | 360 | { |
361 | struct resource irq_res; | 361 | unsigned int irq; |
362 | int irq; | ||
363 | struct clk *clk; | 362 | struct clk *clk; |
364 | unsigned long rate; | 363 | unsigned long rate; |
365 | 364 | ||
@@ -368,11 +367,11 @@ static void __init u300_timer_init_of(struct device_node *np) | |||
368 | panic("could not ioremap system timer\n"); | 367 | panic("could not ioremap system timer\n"); |
369 | 368 | ||
370 | /* Get the IRQ for the GP1 timer */ | 369 | /* Get the IRQ for the GP1 timer */ |
371 | irq = of_irq_to_resource(np, 2, &irq_res); | 370 | irq = irq_of_parse_and_map(np, 2); |
372 | if (irq <= 0) | 371 | if (!irq) |
373 | panic("no IRQ for system timer\n"); | 372 | panic("no IRQ for system timer\n"); |
374 | 373 | ||
375 | pr_info("U300 GP1 timer @ base: %p, IRQ: %d\n", u300_timer_base, irq); | 374 | pr_info("U300 GP1 timer @ base: %p, IRQ: %u\n", u300_timer_base, irq); |
376 | 375 | ||
377 | /* Clock the interrupt controller */ | 376 | /* Clock the interrupt controller */ |
378 | clk = of_clk_get(np, 0); | 377 | clk = of_clk_get(np, 0); |