Commit 882bed72 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Sekhar Nori

ARM: davinci: aintc: request memory region before remapping it

Add a missing call to request_mem_region() before calling ioremap() to
make sure the region is not being used by anyone else.
Reviewed-by: default avatarDavid Lechner <david@lechnology.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent a6c0bba1
......@@ -86,9 +86,18 @@ davinci_aintc_handle_irq(struct pt_regs *regs)
void __init davinci_aintc_init(const struct davinci_aintc_config *config)
{
unsigned int irq_off, reg_off, prio, shift;
void __iomem *req;
int ret, irq_base;
const u8 *prios;
req = request_mem_region(config->reg.start,
resource_size(&config->reg),
"davinci-cp-intc");
if (!req) {
pr_err("%s: register range busy\n", __func__);
return;
}
davinci_aintc_base = ioremap(config->reg.start,
resource_size(&config->reg));
if (!davinci_aintc_base) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment