Prechádzať zdrojové kódy

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>
Boris Brezillon 7 rokov pred
rodič
commit
d28395c908

+ 3 - 3
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;
 		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) {
 	if (!nc->sram.virt) {
 		dev_err(nc->base.dev,
 		dev_err(nc->base.dev,
 			"Could not allocate memory from the NFC SRAM pool\n");
 			"Could not allocate memory from the NFC SRAM pool\n");