summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/atmel
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-07-09 22:09:23 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-07-18 10:10:16 +0200
commitd28395c9083de4ee03e51b804d7acc591191bb00 (patch)
treebed3515f365487430e020e97754f5b610927c7c8 /drivers/mtd/nand/raw/atmel
parente6848511d06189cd28f83e5aef580510699fb2b4 (diff)
mtd: rawnand: atmel: Add an __iomem cast on gen_pool_dma_alloc() call
gen_pool_dma_alloc() return type is void *, while internally, the memory region exposed by the sram driver has been mapped with ioremap(). Add a void * to void __iomem * cast to make sparse happy. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/atmel')
-rw-r--r--drivers/mtd/nand/raw/atmel/nand-controller.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index e8f7549d0354..30dae4c9d439 100644
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
@@ -2219,9 +2219,9 @@ atmel_hsmc_nand_controller_init(struct atmel_hsmc_nand_controller *nc)
return -ENOMEM;
}
- nc->sram.virt = gen_pool_dma_alloc(nc->sram.pool,
- ATMEL_NFC_SRAM_SIZE,
- &nc->sram.dma);
+ nc->sram.virt = (void __iomem *)gen_pool_dma_alloc(nc->sram.pool,
+ ATMEL_NFC_SRAM_SIZE,
+ &nc->sram.dma);
if (!nc->sram.virt) {
dev_err(nc->base.dev,
"Could not allocate memory from the NFC SRAM pool\n");