Skip to content

Commit

Permalink
clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_…
Browse files Browse the repository at this point in the history
…map()

Let's use the of_io_request_and_map() API so that the frame
region is protected and shows up in /proc/iomem.

Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
  • Loading branch information
bebarino authored and dlezcano committed Nov 21, 2016
1 parent e618682 commit f947ee1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/clocksource/arm_arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,9 @@ static int __init arch_timer_mem_init(struct device_node *np)
}

ret= -ENXIO;
base = arch_counter_base = of_iomap(best_frame, 0);
if (!base) {
base = arch_counter_base = of_io_request_and_map(best_frame, 0,
"arch_mem_timer");
if (IS_ERR(base)) {
pr_err("arch_timer: Can't map frame's registers\n");
goto out;
}
Expand Down

0 comments on commit f947ee1

Please sign in to comment.