ARM: davinci: cp-intc: request the memory region before remapping it
Add a missing call to request_mem_region() before calling ioremap() to make sure it's not been requested by another user. Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:
parent
6567954b8e
commit
9cf58a45d7
|
@ -164,6 +164,15 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config,
|
|||
{
|
||||
unsigned int num_regs = BITS_TO_LONGS(config->num_irqs);
|
||||
int offset, irq_base;
|
||||
void __iomem *req;
|
||||
|
||||
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 -EBUSY;
|
||||
}
|
||||
|
||||
davinci_cp_intc_base = ioremap(config->reg.start,
|
||||
resource_size(&config->reg));
|
||||
|
|
Loading…
Reference in New Issue