diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-02-14 15:52:24 +0100 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2019-02-19 20:03:34 +0530 |
commit | 9cf58a45d72bdc88a3f77d6cd4ea76817a3c6392 (patch) | |
tree | 3fc892ac669e4b5d84e2c552201206b2eb4cb0bb /arch/arm/mach-davinci | |
parent | 6567954b8e8e7cbb74b1340038dcac7ecc9e2e1b (diff) | |
download | linux-9cf58a45d72bdc88a3f77d6cd4ea76817a3c6392.tar.gz linux-9cf58a45d72bdc88a3f77d6cd4ea76817a3c6392.tar.bz2 linux-9cf58a45d72bdc88a3f77d6cd4ea76817a3c6392.zip |
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>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/cp_intc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index f56a4275083f..6ab56af3be6b 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c @@ -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)); |